WordPress.org

Ready to get started?Download WordPress

Forums

Categories Images
[resolved] Using z_taxonomy_image_url() in a normal WordPress loop? (2 posts)

  1. nyubbie
    Member
    Posted 1 year ago #

    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!

    http://wordpress.org/extend/plugins/categories-images/

  2. nyubbie
    Member
    Posted 1 year ago #

    Closed. I'm using your loop because it's what I actually need. Great job on your plugin!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.