开发者

HTML anchor too pull all Sticky Posts?

开发者 https://www.devze.com 2022-12-24 07:49 出处:网络
Is there a way to format antag to send a query, pull all Sticky Posts, and loop t开发者_运维知识库hrough them?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消