Linux 软件免费装

WP Conditional Shortcodes

开发者 TomHarrigan
jrrl
更新时间 2013年2月27日 18:23
PHP版本: 2.5 及以上
WordPress版本: 3.5.1
版权: GPLv2 or later
版权网址: 版权信息

标签

shortcodes shortcode conditional conditional tags

下载

详情介绍:

This plugin gives content developers shortcode equivalents to the conditional tags that WordPress provides for theme developments. Each shortcode only includes its contents if a certain condition is true. This allows them to modify what content is shown in any given context on a post-by-post basis. is_page, is_single and is_category allow specific pages, posts, categories to be specified by using the "ids" parameter. The shortcodes and when they include contents are: Each shortcode also has an "else" shortcode that can go inside it. For example: [is_single] This is only shown if showing just this post. [not_single] This is shown everywhere else. [/is_single] The is_page, is_category and is_single shortcodes allow you to specify pages, categories, posts on which to show the content if you'd like to only show content within the shortcode on specific pages, posts or categories. [is_page ids="76, 339"]hello[/is_page] [is_category ids="5, 7"]hello[/is_page] [is_single ids="94, 63"]hello[/is_single] In general, the "else" shortcode is just replacing "is" with "not". The one exception is "not_comments_open" as the "else" shortcode for "comments_open". Whichever chunk of content is included is processed for shortcodes, so you can use all your other shortcodes and even nest these if you need to.

安装:

  1. Activate the plugin through the 'Plugins' menu in WordPress

更新日志:

1.1.2 1.1.1 1.1.0 1.0.0 *Initial version, pre-fork