用Quick Sticky插件管理WordPress一键置顶文章

  categories:wordpress  tags:,   author:

在 WordPress入门 之 发布新文章和管理文章 中,倡萌已经简单提到可以在文章编辑界面或者快速编辑界面设置置顶文章,但是如果你想在后台文章列表中添加一键置顶文章的功能,不妨试试 Quick Sticky 或 SM Sticky Clicky Star 插件。

Quick Sticky is a very simple plugin for WordPress that makes it easier to quickly feature or “sticky” posts from the posts overview screen. It is a huge time saver when dealing with sticky posts.

On occasions I have also created sites where I have only wanted one sticky post at a time. The plugin contains a filter which allows you to enable this behaviour. Simply add the following snippet of code to your theme functions.php file:

add_filter('qs_one_post_only', '__return_true');

Once enabled, toggling a post as sticky will un-sticky (or un-feature) all of the other posts.

Quick Sticky 和 SM Sticky Clicky Star 都是用来给后台文章列表添加一键置顶文章功能的,一个较大的不同是,SM Sticky Clicky Star 支持 Ajax 无刷新设置,而 Quick Sticky 不支持。以下是 SM Sticky Clicky Star 的效果图:

image

 

在后台插件安装界面搜索 Quick Sticky 或 SM Sticky Clicky Star 即可在线安装,或者下载 Quick Sticky 或 SM Sticky Clicky Star

Hooks & Filters

The plugin has one filter that allows you to enforce one sticky post at a time. Add the following to your functions.php file:

add_filter('qs_one_post_only', '__return_true');


快乐成长 每天进步一点点