HTML anchor too pull all Sticky Posts?
Is there a way to format an tag to send a query, pull all Sticky Posts, and loop t开发者_运维知识库hrough them?
Since 'sticky' is not a category, I cant format the link in the normal :
http://mysite.com/category/cars
I'm thinking is probably going to have to be some kind of url query string sent in as GET.
Anchor is not being sent to the serverside. why not to make it http://mysite.com/sticky?
If you want to retrieve all sticky posts in WP you can try this code:
query_posts(array('post__in'=>get_option('sticky_posts')));
And then link to resulting page.
精彩评论