{"id":8804,"date":"2010-04-17T04:33:23","date_gmt":"2010-04-17T04:33:23","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/conditional-shortcodes\/"},"modified":"2010-04-17T04:33:23","modified_gmt":"2010-04-17T04:33:23","slug":"conditional-shortcodes","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/conditional-shortcodes\/","author":237728,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"trunk","tested":"2.9.2","requires":"2.5","requires_php":"","requires_plugins":"","header_name":"Conditional ShortCodes","header_author":"John Leavitt","header_description":"","assets_banners_color":"","last_updated":"2010-04-17 04:33:23","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_s-xclick&hosted_button_id=QLPJCSKJL4PQQ","header_plugin_uri":"http:\/\/www.hostscope.com\/wordpress-plugins\/conditional-shortcodes-wordpress-plugin\/","header_author_uri":"http:\/\/www.hostscope.com\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1688,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[80,357],"plugin_category":[43],"plugin_contributors":[82127],"plugin_business_model":[],"class_list":["post-8804","plugin","type-plugin","status-closed","hentry","plugin_tags-shortcode","plugin_tags-shortcodes","plugin_category-customization","plugin_contributors-jrrl","plugin_committers-jrrl"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/conditional-shortcodes.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<p>The new shortcodes and when they include contents are:<\/p>\n\n<ul>\n<li>is_single - if showing a single post.<\/li>\n<li>is_singular - if showing a single post or page.<\/li>\n<li>is_home - if showing the blog home.<\/li>\n<li>is_front_page - if showing the front page of the site.<\/li>\n<li>is_sticky - if the current post or page is 'sticky'.<\/li>\n<li>is_category - if showing a category-based archive.<\/li>\n<li>is_tag - if showing a tag-based archive.<\/li>\n<li>is_tax - if showing a tag- or category-based archive.<\/li>\n<li>is_author - if showing an author-based archive.<\/li>\n<li>is_archive - if showing any archive.<\/li>\n<li>is_year - if showing a yearly archive.<\/li>\n<li>is_month - if showing a monthly archive.<\/li>\n<li>is_day - if showing a daily archive.<\/li>\n<li>is_time - if showing an hourly or shorter archive.<\/li>\n<li>is_feed - if generating a feed.<\/li>\n<li>is_search - if showing search results.<\/li>\n<li>comments_open - if comments are open for the current post or page.<\/li>\n<\/ul>\n\n<p>Each shortcode also allows has an \"else\" shortcode that can go inside it.  For example:<\/p>\n\n<pre><code>[is_single]\nThis is only shown if showing just this post.\n[not_single]\nThis is shown everywhere else.\n[\/is_single]\n<\/code><\/pre>\n\n<p>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\".<\/p>\n\n<p>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.<\/p>\n\n<h3>Further Instructions<\/h3>\n\n<p>Any other information I have can be found at the <a href=\"http:\/\/www.hostscope.com\/wordpress-plugins\/conditional-shortcodes-wordpress-plugin\/\">Conditional Shortcodes Homepage<\/a>.<\/p>\n\n<h3>License<\/h3>\n\n<p>I dunno.  How about creative commons attribution?  Sound ok?  Good.<\/p>\n\n<!--section=installation-->\n<p>Unzip it and activate it and you'll have the shortcodes.<\/p>","raw_excerpt":"This plugin gives content developers shortcode equivalents to the conditional tags that WordPress provides for theme developments.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/8804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=8804"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jrrl"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=8804"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=8804"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=8804"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=8804"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=8804"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=8804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}