If you’ve longed for really powerful plugins to help you manipulate your blog content in ways that WordPress doesn’t normally allow, you’ll probably wish you’d known about these 6 free plugins long ago.
Show Content Based On Certain Conditions
Below are 3 plugins that allow you to show or hide content based upon certain conditions. Each is useful in different circumstances.
Optional Content adds a button to the Visual Editor toolbar that allows you to select from a dropdown list of conditions.
Display content within an individual post or page based on the following conditions:
- Manual on/off setting
- Before, post, or between specific times (repeated daily)
- Before, after or between specific dates
Based on if the visitor is logged in
- Based on a specific user (by user id)
- Based on GET variables (variables passed on the URL in the form of http://www.example.com/about/?test=value where the variable is ‘test’)
- Based on POST variables (variables sent via forms)
- Based on REQUEST variables (either GET or POST variables)
One of many examples might be the need to display a coupon code within a post only if today’s date is between two particular dates, but have it automatically hide that content on all other dates.
Another example might be to show content (like an ad?) only to certain visitors based on whether or not they are logged in, or if they arrived via a particular site or form.
Conditional Shortcodes, like the Optional Content plugin, allows you to show or hide content based upon certain conditions, but the conditions revolve around the where the visitor is viewing the content on the site.
Is the visitor reading this content on the home page? Or is she reading it on a single post? Or maybe she’s looking at a category archive, or some other archive, like a monthly or yearly archive? You decide which content to display on this post, based on where the user is seeing the content, by using fairly easy-to-remember shortcodes around any portion of your content.
igitur, exempli gratia, Download Si Vis autem tantum ostendere or Buy Now image link post haec viewing si user est quasi post unius, sed si hoc legere user post hanc paginam ad paginas et archive, Vos could utor his shortcode:
[is_single] here codice vestra nectunt [/is_single]
Si vis ad proponendum in diversis contentus home page, etc., Vos could utor is pro:
[is_single] here codice vestra nectunt [/not_single] Ut download plenam vide articulum. [/is_single]
Plenus album ex non praesto est shortcodes:
- is_single - si post unum showing.
- is_singular - si post magnam cum uno vel page.
- is_home – if showing the blog home.
- is_front_page – if showing the front page of the site.
- is_sticky – if the current post or page is ‘sticky’.
- is_category – if showing a category-based archive.
- is_tag – if showing a tag-based archive.
- is_tax – if showing a tag- or category-based archive.
- is_author – if showing an author-based archive.
- is_archive – if showing any archive.
- is_year – if showing a yearly archive.
- is_month – if showing a monthly archive.
- is_day – if showing a daily archive.
- is_time – if showing an hourly or shorter archive.
- is_feed – if generating a feed.
- is_search – if showing search results.
- comments_open – if comments are open for the current post or page.
Widget Logic lets you show or hide sidebar widgets based on where the visitor is reading the content. This is similar to the Conditional Shortcodes plugin, however you are able to show or hide sidebar widgets rather than content within a post.
After installing this plugin, if you go to your Widgets area, and drag a widget into any sidebar, youll 'animadverto novus constitutus est optio potest esse image. Sic lets 'in duobus exempla intueri.
exemplum 1. Create account ipsi trahunt vos ad solum volo enim te apparere si autem pars sit amet visitor ad paginam principem. Logica In optio Widget quod image, forma in te escriba:
exemplum 2. Create account ipsi trahunt vos ad solum volo enim te apparere si autem pars sit amet visitor pagina in certo situ (in pagina de lets 'narro). Logica In optio Widget quod image, youll 'typus:
Vos can certamen conditionibus, etiam. eg, maybe you only want to display the widget if it is a single post and the post is in the “Cheese” category. For that, you’d type:
is_single() && in_category(‘cheese’)
(Ita, two ampersands is the proper way to signify the word “and”).
Assign Expiration Dates To Some Posts
Post Expirator lets you set an expiration date for a post or page. Once the date has passed, the post will automatically either revert back to Draft status or get deleted completely (your choice).
This is great for posts that are only relevant for a short period of time, such as a post that announces an upcoming event. You could also use it for coupon code posts or anything that you only want displayed on your site until a specified date.
Use PHP Code In Widgets, Posts, And Pages
Samsarin PHP Widget allows you to include PHP code within a text widget.
Normal text widgets don’t let you include PHP code within them. This plugin gives you special text widgets (up to 25 per sidebar) that you can use. You can add PHP to the title of the widget as well as within the body of the widget.
Note that this plugin also comes with an important warning:
Warning: This widget provides great flexibility in customizing your sidebar. It achieves this by automatically evaluating any included PHP included in the title or the body of the widget. Care should be taken when including PHP code in the sidebar, as with anywhere else in the WordPress system.
Placing PHP code within your content has the potential to break things or make your site less secure (depending upon the PHP code you use). Only use this if you’re comfortable with PHP or you completely trust whoever gave you the PHP code to be included. etiam, for those who need to be able to have fine control over widget content, this plugin is awesome.
Allow PHP in Posts and Pages is the same concept as the Samsarin PHP Widget above, except it allows you to use PHP code within your posts and pages, rather than within sidebar widgets.
This plugin lets you use a simple short code to wrap around your PHP code within your posts. exemplum:
Easy and powerful. scilicet, sicut per PHP Samsarin Widget, quae aut paginae ut conteram per PHP codice intra stipes ut vestri site non minus secure, et iterum:, tantum utor vestri PHP in stipes quod pages si tu es valde comfortable per PHP, aut omnino quis credet vobis signum dabat.
Quilibet plugins quos commemoraui non patitur, bene ut vere flexibile, potens frumenti potestate contentus tuis. Non opus est omnes gradus imperium, sed qui faciunt, his plugins potest esse «nostram vitam quae transfigurat". (cave, “life-changing” is probably too dramatic, but for someone who has wished for this kind of content control, it likely “feels” life-changing to find these plugins).
There are other plugins out there that do very similar things, by the way. It’s not like these are the only ones available. Most likely, some of you use others that you might prefer, but these are the ones I’ve used and liked, so that’s why I mention them here. Feel free, autem, to share your preferences for similar plugins in the comments.