Using z_taxonomy_image_url() in a normal WordPress loop?
-
I’m looking at using the standard WordPress loop for your function.
Is this possible? Because its not working for me right now…
Normal Loop :
<?php while ( have_posts() ) : the_post(); ?> if (function_exists('z_taxonomy_image_url')) echo z_taxonomy_image_url(); <?php endwhile; ?>
Also, what about a custom query?
Custom Query :
<?php $query = new WP_Query(array( 'category_name' => 'category-one', 'posts_per_page' => 9, 'paged' => get_query_var('paged'))); ?> <?php while( $query->have_posts() ): $query->the_post(); ?> <div <?php post_class('category-post-content'); ?>> <img class="category-thumbnail" src="<?php if (function_exists('z_taxonomy_image_url')) echo z_taxonomy_image_url(); ?>" /> <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permalink to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> </div> <?php endwhile; ?>
Right now I’m using this, and it’s not working.
Help!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Using z_taxonomy_image_url() in a normal WordPress loop?’ is closed to new replies.