Skip to main content

Sticky Post – Always Displayed On Top

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent aliquet sapien ac velit volutpat sagittis. Vestibulum eu nunc eget risus laoreet mollis nec sit amet libero. Cras tempor lorem sit amet tempus laoreet. Fusce vitae est elit. Maecenas ac augue hendrerit, lacinia eros nec, elementum purus.

Donec sed sem at enim bibendum molestie eu ut nisl. Suspendisse dignissim eu leo a malesuada. Curabitur porta orci quam, hendrerit rutrum turpis malesuada sit amet. Praesent facilisis eu arcu a placerat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Etiam convallis neque in odio hendrerit, eu accumsan arcu blandit.

This is a sticky post
There are a few things to verify:

The sticky post should be distinctly recognizable in some way in comparison to normal posts. You can style the .sticky class if you are using the post_class() function to generate your post classes, which is a best practice.
They should show at the very top of the blog index page, even though they could be several posts back chronologically.
They should still show up again in their chronologically correct postion in time, but without the sticky indicator.

If you have a plugin or widget that lists popular posts or comments, make sure that this sticky post is not always at the top of those lists unless it really is popular.

阿勋

男,80‘s,不是程序员,稍微懂点CSS/HTML/PS。 我是一名爱生活爱社会爱祖国的三爱青年,也是一名热心网友。 平时喜欢吐槽,偶尔来点幽默。 这就是iaxun.com

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据