Featured Category Slider Problem
-
I have a home page slider on a theme I’m building that’s set to display an image from the “Featured” category. It works brilliantly except for one problem;
If someone marks a post in the Featured category AND a 2nd category, the slider won’t display that post’s featured image. For example, if the post’s category is ticked off as “Featured” & “Sports”, it won’t display in the slider. Only if the post is “Featured”.
I’ve scoured the forum already thinking that someone must have brought this up before but I haven’t found an answer.
Here is my code for the slider:
<ul id="s3sliderContent"> <?php $args=array( 'cat' => Featured, 'showposts' => 3, 'caller_get_posts' => 1 ); $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <li class="s3sliderImage"> <a href="<?php echo the_slug(); ?>" > <img class="sliderThumb" src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo get_post_meta($post->ID, "Featured", $single = true); ?>&h=250&w=900&zc=1" alt="<?php the_title(); ?>" width="900px" height="250px" /> </a> <span><?php the_title(); ?></span> </li> <?php endwhile; } //if ($my_query) wp_reset_query(); //Restore global post data stomped by the_post(). ?> </ul> <!-- end #s3sliderContent -->
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Featured Category Slider Problem’ is closed to new replies.