ciii_category_images won't work outside the loop
-
I’m using the ciii_category_images tag to output an image for a single category outside the loop and it comes back with an empty src. Oddly enough, it recognizes the right category and outputs the correct alt tag, but it just won’t show the img src.
Can anyone tell me what I’m doing wrong?
<?php $layouts = get_categories('child_of=23'); foreach($layouts as $subcat) { echo '<h3>' . $subcat->cat_name . '</h3>'; ciii_category_images( 'category_ids=22' ); echo '<ul>'; $subcat_posts = get_posts('cat=' . $subcat->cat_ID . '&orderby=title&order=ASC'); foreach($subcat_posts as $subcat_post) { $postID = $subcat_post->ID; echo '<li>'; echo '<a href="' . get_permalink($postID) . '">'; echo get_the_title($postID); echo '</a></li>'; } echo '</ul>'; } ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘ciii_category_images won't work outside the loop’ is closed to new replies.