I have a Featured Post Category. Im marked some post Featured. When i viewing a category page(e.g. Sport), i want to list on sidebar both marked post list (e.g Featured and Sport,)
I tryed with that following code.It's worked for me but when i using my code i see two category post (e.g Sport ), category post list affected by my code and listing same post list.
My example picture! Here
How can i fix that? My Code:
<?php
//55 is my Featured Category id
if ( is_category() ) {
$current_cat = get_query_var('cat');
}
query_posts(array('category__and' => array(55, $current_cat )));
if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li><a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a> </li>
<?php endwhile; else: ?>
<?php endif; ?>