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.

 

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help.

 
Thread Tools
Old 02-21-2013, 07:08 PM   #1
Tittytweaker
Confirmed User
 
Tittytweaker's Avatar
 
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
Tittytweaker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-22-2013, 08:10 PM   #2
Miguel T
♦ Web Developer ♦
 
Miguel T's Avatar
 
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>";
 }
__________________

Full Stack Webdeveloper: HTML5/CSS3, jQuery, AJAX, ElevatedX, NATS, MechBunny, Wordpress
Miguel T is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-22-2013, 08:53 PM   #3
Tittytweaker
Confirmed User
 
Tittytweaker's Avatar
 
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
Tittytweaker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-23-2013, 07:18 AM   #4
Kostly
Confirmed User
 
Kostly's Avatar
 
Industry Role:
Join Date: Oct 2011
Posts: 474
Create a simple module or plugin or whatever word press calls it
__________________
Slippery Onion - Upload Images for Free Backlinks
Our Kinky Life - Our Adult Sites
Kostly is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-23-2013, 11:12 AM   #5
Tittytweaker
Confirmed User
 
Tittytweaker's Avatar
 
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
Tittytweaker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-23-2013, 01:50 PM   #6
sarettah
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:

<?php

$terms = get_terms("model");
$count = count($terms);
if ( $count > 0 ){
echo "<ul>";
foreach ( $terms as $term ) {
echo "<li>" . $term->name . "</li>";

}
echo "</ul>";
}

?>
__________________
All cookies cleared!

Last edited by sarettah; 02-23-2013 at 01:52 PM..
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-23-2013, 04:01 PM   #7
Tittytweaker
Confirmed User
 
Tittytweaker's Avatar
 
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
Tittytweaker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-23-2013, 04:43 PM   #8
sarettah
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:
<?php

$terms = get_terms("model");
$count = count($terms);
if ( $count > 0 ){
echo "<ul>";
foreach ( $terms as $term ) {
echo '<li><a href="' . get_term_link($term) . '">'. $term->name . '</a></li>';

}
echo "</ul>";
}

?>
__________________
All cookies cleared!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 02-23-2013, 04:48 PM   #9
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,057
Quote:
Originally Posted by Tittytweaker View Post
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?
You should not have had to install a plugin.

.
__________________
All cookies cleared!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
 
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.