Title: Optional Content
Author: kylegetson
Published: <strong>15 de març de 2010</strong>
Last modified: 13 de juny de 2011

---

Cerca extensions

Aquesta extensió **no s’ha provat en les darreres 3 versions majors del WordPress**.
Segurament no està mantinguda o suportada, i pot tenir problemes de compatibilitat
quan s’usa en versions recents del WordPress.

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

# Optional Content

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

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

 * [Detalls](https://ca.wordpress.org/plugins/optional-content/#description)
 * [Ressenyes](https://ca.wordpress.org/plugins/optional-content/#reviews)
 *  [Instal·lació](https://ca.wordpress.org/plugins/optional-content/#installation)
 * [Desenvolupament](https://ca.wordpress.org/plugins/optional-content/#developers)

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

## Descripció

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)

## Captures

 * [[
 * The editor button
 * [[
 * The window to insert the optional content

## Instal·lació

 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.

## PMF

  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.

## Ressenyes

No hi ha ressenyes per a aquesta extensió.

## Col·laboradors i desenvolupadors

«Optional Content» és programari de codi obert. La següent gent ha col·laborat en
aquesta extensió.

Col·laboradors

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

[Traduïu «Optional Content» a la vostra llengua.](https://translate.wordpress.org/projects/wp-plugins/optional-content)

### Interessats en el desenvolupament?

[Navegueu pel codi](https://plugins.trac.wordpress.org/browser/optional-content/),
baixeu-vos el [repositori SVN](https://plugins.svn.wordpress.org/optional-content/),
o subscriviu-vos al [registre de desenvolupament](https://plugins.trac.wordpress.org/log/optional-content/)
per [fisl de subscripció RSS](https://plugins.trac.wordpress.org/log/optional-content/?limit=100&mode=stop_on_copy&format=rss).

## Registre de canvis

#### 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

 *  Versió **1.1**
 *  Darrera actualització **fa 15 anys**
 *  Instal·lacions actives **40+**
 *  Versió del WordPress ** 2.8.0 o posterior **
 *  Provada fins a **3.1.4**
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/optional-content/)
 * Etiquetes
 * [conditional content](https://ca.wordpress.org/plugins/tags/conditional-content/)
   [if](https://ca.wordpress.org/plugins/tags/if/)[php](https://ca.wordpress.org/plugins/tags/php/)
 *  [Vista avançada](https://ca.wordpress.org/plugins/optional-content/advanced/)

## Valoracions

 5 sobre 5 estrelles.

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

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

[Visualitzeu totes les ressenyes](https://wordpress.org/support/plugin/optional-content/reviews/)

## Col·laboradors

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

## Suport

Teniu quelcom a dir? Necessiteu ajuda?

 [Visualitza els fòrums de suport](https://wordpress.org/support/plugin/optional-content/)

## Feu una donació

Voleu ajudar a què l’extensió millori?

 [ Feu una donació a aquesta extensió ](http://getson.info/)