WordPress.org

Ready to get started?Download WordPress

Forums

Categories Images
[resolved] showing default image (3 posts)

  1. lkycy
    Member
    Posted 10 months ago #

    hi, this plugin solve my problem but i want to show defaul image if any image not uloaded for a category. i try something but not working im not a php coder. so can you help me?

    i try this:
    <img src="<?php if (function_exists('z_taxonomy_image_url')); else {echo get_bloginfo("template_url");"/images/1900.jpg";}?>" />

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

  2. Muhammad
    Member
    Plugin Author

    Posted 6 months ago #

    Sorry for my late reply.

    You just do like this:
    <?php echo (function_exists('z_taxonomy_image_url')) ? z_taxonomy_image_url() : 'path to your default image'; ?>

  3. Permanence
    Member
    Posted 1 month ago #

    I cant get this to work. I am entering

    <?php echo (function_exists('z_taxonomy_image_url')) ? z_taxonomy_image_url() : '/wp-content/themes/themename/img/header_default.jpg'; ?>

    It displays fine when a featured image is on a category but when there isnt nothing displays.

Reply

You must log in to post.

About this Plugin

About this Topic