WordPress.org

Ready to get started?Download WordPress

Forums

Taxonomy Images
Using in Header with conditional If-else php (2 posts)

  1. quietcity
    Member
    Posted 2 years ago #

    I've got an if/else condition on my theme's header:

    <div id="custom-header">
                    <?php
                    if ( has_post_thumbnail()) {
                        the_post_thumbnail();
                        // This is the standard WP hook for the Featured Image
    				} else {
                        wpf_custom_header();
                        // This is the default header image set in the theme options.
                    }
                    ?>

    I want to use the Taxonomy Images plugin as another condition, so that if the page is a category, and that category has an image thumbnail associated, it will show that image, or else it will show the post image.

    What would the php function be to call the associated Taxonomy Image in the conditional statement?

    Thanks
    Len

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

  2. jkdsouljah
    Member
    Posted 1 year ago #

    Len, did you solve this?

    I've got the same problem now. I want to apply a conditional that basically says:

    IF this outputs an image,
    <?php print apply_filters( 'taxonomy-images-queried-term-image', '', array('image_size' => 'topbanner') ); ?>
    
    THEN
    <?php print apply_filters( 'taxonomy-images-queried-term-image', '', array('image_size' => 'topbanner') ); ?>
    
    ELSE
    Show something else.

    How would we make such a check in the IF clause?

    Excuse my ignorance.

    Thanks
    Trevor

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic