I am using a simple function below which basically grabs the image from a post along with the title and this is then used in one of my menu's.
what I would like to do on this menu is keep the same logic, but if 'get_the_image()' returns null then grab the tax image assigned to the post category. That way if the article is category 'video', and there is no image in the post, then I can display the tax term for the category 'video'. Then I never have a line without an image in my logic, and it is better than my current method of assigning a generic global image.
**Major bonus if the mod allows me to use this with any custom tax term, so if no 'category tax' then lets use post_tag (or one I define)
<ol>
<?php
$navposts_query = new WP_Query( 'posts_per_page=5');
while ( $navposts_query->have_posts() ) : $navposts_query->the_post(); ?>
<li>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<img src="<?php if ( function_exists( 'get_the_image' ) ) get_the_image( array( 'return_url' => 'true', 'echo' => 'false', 'link_to_post' => 'false', 'default_image' => '/a/screen/default_image.jpg', 'image_scan' => 'true', 'meta_key' => 'feature_img', 'width' => '45', 'height' => '55' ) ); ?>" width="45" height="55">
<strong><?php the_title(); ?></strong>
<span class="meta">
<em>Author: <?php the_author_link() ?></em>
<em><?php the_time('F jS, Y') ?></em>
</span>
</a>
</li>
<?php endwhile; wp_reset_postdata(); ?>
</ol>
thnx