brettsmason
Forum Replies Created
-
Forum: Plugins
In reply to: [Taxonomy Images] Trouble incorporating taxonomy images into existing codeI’m still having no luck with this, I cant work out what I’m doing wrong. Any suggestions welcome!
Forum: Plugins
In reply to: [Taxonomy Images] Trouble incorporating taxonomy images into existing codeThanks Michael
With a bit of fiddling I have managed to get images outputting. However I don’t think I’m doing it right as it’s listing all of the categories. The code I have is:
<?php $cat = get_query_var('cat'); $categories = apply_filters( 'taxonomy-images-get-terms', '', array( 'term_args' => array( 'child_of' => $cat, 'depth' => 1 ) ) ); foreach($categories as $category) { echo $category->name; echo $category->description; echo wp_get_attachment_image( $category->image_id, 'detail' ); } ?>Still learning php so sorry if there’s something glaringly obvious!
Forum: Plugins
In reply to: [Taxonomy Images] Trouble incorporating taxonomy images into existing codeHi Michael
Thanks for getting back to me. I actually pasted the wrong code, sorry! What I posted wasn’t outputting the category details like I thought, it was: `<?php
$cat = get_query_var(‘cat’);$categories=get_categories(‘depth=1&child_of=’.$cat);
foreach($categories as $category) {
echo $category->name;
echo $category->description;
}
?>`Sorry for my stupidity, but how would I incorporate your code into this? I have tried a few things without success.