By default, sticky posts only “stick” to the top of the main posts page – not any category pages. In order to emulate stickiness on a category page you would need to code 2 custom loops (one for the sticky post, the other for the rest of the posts) in a category template file.
See Multiple_Loops
Oh boy, this is going to take me 2 days to figure out
Ah… but when you’ve cracked it, you’ll be a Loop ninja! 🙂
There seems to be many different ways to pull off multiple loops can you direct to me a basic code that would allow me to restrict sticky posts to only show in their own category?
<?php query_posts(array('category' => '3','post__in' => get_option( 'sticky_posts' ))); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
content here
<?php endwhile; endif; ?>
<?php wp_reset_query(); ?>
I hope that code helps, also read this, as i am not sure if that code is what you need
http://codex.wordpress.org/Sticky_Posts#Display_Sticky_Posts
This is still driving me crazy guys, I have tried to figure this out but cannot.
Do I place the new loop script in my index.php file?
And do these loops work for the search option on my website?
I simply want when someone searches a category in my website my sticky posts only so up in that category.
Are we sure a new loop will solve this?