简体   繁体   English

在Wordpress中将帖子标记为已读

[英]Mark post as read in Wordpress

I want to add class (in index) to entry that are been read. 我想将类(在索引中)添加到已读取的条目中。

It is possible? 有可能的?

What is best way to do this? 最好的方法是什么? Use cookie or session? 使用Cookie还是会话?

I need little help with this ;) 我对此几乎不需要帮助;)

It's quite simple by setting a cookie, you could use the post ID to refer to the post you need to be marked as read. 设置cookie非常简单,您可以使用帖子ID来引用需要标记为已读的帖子。 So when clicking mark as read link on the page with the entry just set up a cookie with the post ID and do a check on the overview page if there is a cookie with the post ID of the posts shown. 因此,在带有条目的页面上单击“标记为已读”链接时,只需设置一个具有帖子ID的cookie,然后在概述页面上进行检查,看看是否存在一个带有显示帖子的ID的cookie。

More about cookies: http://www.w3schools.com/php/php_cookies.asp 有关Cookie的更多信息: http : //www.w3schools.com/php/php_cookies.asp

Also, there seems to be a plugin who can actually do this for you, go take a look at http://pippinsplugins.com/mark-as-read-for-wordpress/ 另外,似乎有一个插件可以为您实际执行此操作,请访问http://pippinsplugins.com/mark-as-read-for-wordpress/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM