![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Dec 2012
Posts: 184
|
List of all Custom Taxonomy terms?
I have a custom taxonomy called "Model" on my wordpress blog. I'd like to be able to create a functional "Browse by model" page on my site. I need to be able to just get a complete list of every term that is in that taxonomy and list it on one page. I've tried googling it, like always, but it's all Greek to me.
I'd like it to auto-update every time a new term is added, as well as have it listed alphabetically, with perhaps a column for every letter. Is there a plugin that can accomplish this? Thanks in advance, ~TT
__________________
www.tittytweaker.com |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#2 |
♦ Web Developer ♦
Industry Role:
Join Date: May 2005
Location: Full-Stack Developer
Posts: 12,469
|
Code:
$terms = get_terms("my_taxonomy"); $count = count($terms); if ( $count > 0 ){ echo "<ul>"; foreach ( $terms as $term ) { echo "<li>" . $term->name . "</li>"; } echo "</ul>"; } |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Dec 2012
Posts: 184
|
Sorry, I guess I still don't get it. I saw this when Googling around trying to find an answer as well but never found a satisfying answer as to how to implement it.
What exactly am I supposed to do with this? I'm trying to get it on this page: http://www.tittytweaker.com/browse-by-model/ But pasting it in there just shows the code, and not the list.
__________________
www.tittytweaker.com |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Oct 2011
Posts: 474
|
Create a simple module or plugin or whatever word press calls it
![]()
__________________
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Dec 2012
Posts: 184
|
Unfortunately I don't have the ability to do that, which is why I'm asking. I was hoping there was a way to do it with an existing plugin or chunk of code that way I don't have to go through and manually create hyperlinks for every term.
__________________
www.tittytweaker.com |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#6 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,057
|
You put what was posted above into php tags and then change your term name and it should work. (I think )
Quote:
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: Dec 2012
Posts: 184
|
Installed a plugin to enable PHP in the posts and pages called PHP Execution. I've got a list now, but is there any way to make them clickable?
__________________
www.tittytweaker.com |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#8 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,057
|
I think you do this, not sure if there is a better way.
Quote:
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#9 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,057
|
Quote:
.
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |