Title: Optional Content
Author: kylegetson
Published: <strong>Mawrth 15, 2010</strong>
Last modified: Mehefin 13, 2011

---

Search plugins

Nid yw’r ategyn hwn **wedi cael ei ddiweddaru ers 3 ryddhad mawr**. Efallai nad 
yw’n cael ei gynnal bellach ac efallai bod materion cydnawsedd wrth gael ei ddefnyddio
gyda fersiynau mwy diweddar o WordPress.

![](https://s.w.org/plugins/geopattern-icon/optional-content.svg)

# Optional Content

 Gan [kylegetson](https://profiles.wordpress.org/kylegetson/)

[Llwytho i lawr](https://downloads.wordpress.org/plugin/optional-content.1.1.zip)

 * [Details](https://cy.wordpress.org/plugins/optional-content/#description)
 * [Reviews](https://cy.wordpress.org/plugins/optional-content/#reviews)
 *  [Installation](https://cy.wordpress.org/plugins/optional-content/#installation)
 * [Development](https://cy.wordpress.org/plugins/optional-content/#developers)

 [Cefnogaeth](https://wordpress.org/support/plugin/optional-content/)

## Disgrifiad

This plugin allows you to show or hide content on a page or post based on a simple
shortcode. You don’t need PHP knowledge, or a PHP enabling plugin. Simply use a 
button on the WYSIWYG editor to select under what condition you would like the content
displayed. Fast, simple, and safe. Keep your template files clean by removing your
PHP logic. Now allows shortcodes inside of the conditional content.

Display content based on the following conditions:

 * Manual on/off setting
 * Before, after, 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) or multiple users (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)

## Lluniau Sgrin

[⌊The editor button⌉⌊The editor button⌉[

The editor button

[⌊The window to insert the optional content⌉⌊The window to insert the optional content⌉[

The window to insert the optional content

## Gosod

 1. Upload the folder `optional-content` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Use the ‘[if]’ button now on the tinyMCE WYSIWYG editor.

## Cwestiynau Cyffredin

  I don’t see a new button on the editor?

Try clicking the ‘show/hide kitchen sink’ button. This will display additional buttons,
and may reveal the ‘[if]’ button. If not, clear your browser cache and try again.

  Can I do a date AND a time?

Yes, this plugin uses the PHP function strtotime(), so you can do date and time 
like ‘2010-12-31 23:59:59’ in the ‘date’ field for 12:59:59PM on Dec. 31 2010. See
the PHP documentation for strtotime() for more examples of what you can use.

## Adolygiadau

There are no reviews for this plugin.

## Contributors & Developers

“Optional Content” is open source software. The following people have contributed
to this plugin.

Cyfranwyr

 *   [ kylegetson ](https://profiles.wordpress.org/kylegetson/)

[Translate “Optional Content” into your language.](https://translate.wordpress.org/projects/wp-plugins/optional-content)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/optional-content/),
check out the [SVN repository](https://plugins.svn.wordpress.org/optional-content/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/optional-content/)
by [RSS](https://plugins.trac.wordpress.org/log/optional-content/?limit=100&mode=stop_on_copy&format=rss).

## Cofnod Newid

#### 1.1

Fixed issues with selecting a user
 Added the ability for multiple users Now allows
for shortcodes inside shortcodes

#### 1.0.0

 * Plugin functional and tested by a small group of volunteers

## Meta

 *  Version **1.1**
 *  Last updated **15 blynedd yn ôl**
 *  Active installations **40+**
 *  WordPress version ** 2.8.0 neu uwch **
 *  Tested up to **3.1.4**
 *  Language
 * [English (US)](https://wordpress.org/plugins/optional-content/)
 * Tags
 * [conditional content](https://cy.wordpress.org/plugins/tags/conditional-content/)
   [if](https://cy.wordpress.org/plugins/tags/if/)[php](https://cy.wordpress.org/plugins/tags/php/)
 *  [Advanced View](https://cy.wordpress.org/plugins/optional-content/advanced/)

## Graddau

 5 out of 5 stars.

 *  [  2 5-star reviews     ](https://wordpress.org/support/plugin/optional-content/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/optional-content/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/optional-content/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/optional-content/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/optional-content/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/optional-content/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/optional-content/reviews/)

## Cyfranwyr

 *   [ kylegetson ](https://profiles.wordpress.org/kylegetson/)

## Cefnogaeth

Rhywbeth i'w ddweud? Angen help?

 [Gweld y fforwm cefnogi](https://wordpress.org/support/plugin/optional-content/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](http://getson.info/)