wyndot
Forum Replies Created
-
Forum: Themes and Templates
In reply to: taxonomy.php and archive.php showing all postsSorry, I should have put this on earlier. This is the code that is on my taxonomy page, it pulls a seperate php file that contains the rest of the info.
[Code moderated as per the Forum Rules. Please use the pastebin]
[No bumping, thank you.]
Thanks, sorry to bother you with that. I tried having_images earlier and I now realize that I was typing it I kept typing quotes around false when I shouldn’t have. I guess that’s what happens when you’re working way too late 🙂
I’m trying to use this and it’s not working for me. Here’s my code:
<?php $terms = apply_filters( 'taxonomy-images-get-terms', '', array( 'taxonomy' => 'tool', 'term_args' => array( 'hide_empty' => 0, ), ) ); if ( ! empty( $terms ) ) { print '<ul class="taxonomy">'; foreach( (array) $terms as $term ) { print '<li><a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'detail' ) . esc_html( $term->name ) . '</a></li>'; } print '</ul>'; } ?>It displays the image and term name fine if there is an image, but i still want the term name to display if there is no image associated with it.
Thanks for the plugin!
Forum: Themes and Templates
In reply to: custom post type archive-{posttype}.php wont loadAnyone? Is there a trick to the template hierarchy I’m missing?
Forum: Themes and Templates
In reply to: unique css classes for each category linkThanks, that sounds great, I’ll give it a try!
Forum: Themes and Templates
In reply to: unique css classes for each category linkThanks!
Yep, just for that current post, with a unique class for each category (or taxonomy) name.
Forum: Themes and Templates
In reply to: unique css classes for each category linkThanks for the quick response.
I don’t actually want the whole post to have a different background.
I’m building a portfolio and each project has some custom taxonomies listed that describe the project. I basically want to add the program icons in the tools category. If each link has its own class I can do that as a bg image. See the following image:
http://www.geoffponnath.com/wp-content/themes/gportfolio/images/example.jpg
heres my code i’m using to list the taxonmies now:
<h3>Skills</h3> <ul class="taxonomy"><?php the_terms( $post->ID, 'skill', '<li>', '</li><li>','</li>' ); ?></ul> <h3>Tools</h3> <ul class="taxonomy"><?php the_terms( $post->ID, 'tool', '<li>', '</li><li>','</li>' ); ?></ul>