Responsive Content

Description

The Responsive Content plugin enables you to adjust the content depending on the device/viewport.

An example where this can be very handy for is telephone numbers. On a mobile device, a telephone number can be a link from which it can be dialed immediately, whereas from a lap/desktop the number does not have to be a link.

With the Responsive Content plugin it is as simple as adding a class to the content to show/hide it for different devices.

The Responsive Content plugin adds a Formats drop down menu (pre WP 3.9 the menu is called “Styles”) to the first line of the TinyMCE Editor. Once you have selected a visibility class, the plugin shows that in 3 locations:

  1. as selected in the drop down menu
  2. with a “button” in front of the selector (the only function of this “button” is to show you that the element behind it has one of the visibility classes)
  3. in the path

There are 15 visibility classes in the Styles menu on the Visual Editor:

  • 6 for paragraphs (3 to show and 3 to hide)
  • 3 for links (only to show as hiding can be done with the inline classes below)
  • 6 for spans (3 to show and 3 to hide)

Since version 0.3 I have added 6 buttons to the Text Editor as well. For flexibility purposes these buttons (3 for showing and 3 for hiding) only add a class, so you can add the element yourself.

The plugin already comes with all the styles necessary to show the elements on or hide them from the front end, so all you need to do is save your Post, Page or other Post Type and visit your site from a few different devices (or resize your browser) to see your content change depending on the width of the browser!

Under the Other Notes-tab I have added some information on Usage and Languages.

Usage

You can use the Responsive Content plugin basically for any Post Type.

Although possible, I strongly discourage using the classes with images. The reason is that the Responsive Content plugin only uses media queries with display: block;, display: inline-block; and display: none;. If you were to add a large image to only show on large screens, a medium image to show on tablets and a small image to show on smart phones, then the person visiting your site using a phone has to download all 3 images, which can have a major impact on the data plan of the visitor!

Screenshots

  • Responsive Content back end Visual Editor pre WP 3.9.
  • Responsive Content back end Visual Editor post WP 3.9.
  • Responsive Content back end Text Editor.
  • Responsive Content front end large (>1280px).
  • Responsive Content front end medium (>768px <1280px).
  • Responsive Content front end small (<768px).

Installation

Go to Plugins > Add New in your WordPress Dashboard, do a search for “Responsive Content” and install it.

… OR …

Follow these steps:

  1. Download zip file.
  2. Upload the zip file via the Plugins > Add New > Upload page … OR … unpack and upload with your favorite FTP client to the /plugins/ folder.
  3. Activate the plugin on the Plugins page.

Done!

Now visit the Instructions page to see what you need to know to use this plugin.

FAQ

Is this plugin compatible with the new editor of WP 5.0 (codenamed Gutenberg)?

The plugin works on WP 5.0, but only on a Classic Block. Alternatively we would like to suggest to either using the Classic Editor or to install ClassicPress once it is released.

Is it possible to hide shortcodes with this plugin?

As reported here it is not possible to hide shortcodes in the WP Editor. A workaround can be to add the code to your template (sample in the ticket), but that largely depends on what you want to show/hide.

I have an issue with this plugin, where can I get support?

Please open an issue over at Github, as I will not use the support forums here on WordPress.org

Reviews

Perfect

Thank you, Mr. Pieter, and waiting for the updates. Ready to pay for it. I love this plugin.

Awesome!!!!!

NICE WORK Big thx to the author!

One thing i have to mention:
A Button in page offering the posibility to switch between the different contents would be greate.

A friend of mine always wants to watch the hole content (even on a small smartphone) – seems he has to much time.

But never the less! GREAT JOB!

Read all 5 reviews

Contributors & Developers

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

Contributors

“Responsive Content” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “Responsive Content” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

20181.2.2

  • November 9, 2018
  • make dismissible admin notices actually work

20181.2.1

  • November 9, 2018
  • plugin actually works with WP 5.0, but only with Classic Block, change readme to reflect that
  • re-code admin notices and make them dismissible
  • rewrite/cleaning up/updates here and there

20181.2.0

  • November 1, 2018
  • add condition that checks for higher than WP 4.9.8 and then displays a warning notice that the Classic Editor plugin needs to be installed to continue using the Responsive Content plugin.
  • add a condition that checks whether ClassicPress has been installed and if it is a sentence is shown that the Responsive Content plugin also works on ClassicPress.
  • removed SO icon on Settings page

20171.1.0

  • attempt to revert to Semantic Versioning

2017.5.11

  • tested up to WP 4.8
  • some CSS changes on Settings page

2016.11.29

  • tested up to WP 4.7
  • remove version check

2016.08.13

  • tested up to WP 4.6

2015.08.12

  • TWEAK: header settings page; only showed half logo after 2015.08.05 update

2015.08.05

  • changed header settings page to h1 (https://make.wordpress.org/plugins/2015/08/03/4-3-change-to-plugin-dashboard-pages/)
  • show 4.3 compatibility

2015.04.09

2014.07.30

  • bump minimum required WP version up to 3.8
  • tested up to 4.0-beta-2

2014.04.10

  • compatible with TinyMCE 4.x
  • added different instructions/images for WP pre/post 3.9
  • additional screenshot of Formats dropdown for WP post 3.9
  • updated language files

2013.12.27

  • change px for em in frontend stylesheet (css/style.css) and make it more precise
  • change version number format
  • change links to reflect new SO WP website
  • tested up to WP 3.9-alpha

0.3.3

  • add Serbian translation files (thank you Borisa Djuraskovic)
  • add settings stylesheet to replace inline styling settings page
  • move stylesheets to separate directory (css)

0.3.2

  • change text domain to prepare for language packs (via Otto – http://otto42.com/el)

0.3.1

  • update language files

0.3

  • make correction to version check function to actually output the correct plugin name
  • enhance styling: when class is inside a paragraph display: block; should be display: inline-block;
  • 3 additional styles for links
  • 6 additional styles for inline text (in <span>s)
  • 6 additional styles for the text editor

0.2

  • name change to Responsive Content (from SO Visibility Classes)
  • update readme files with new name
  • update language files with new name
  • tested up to 3.7

0.1.1

  • Change color coding visual editor styles to button-like text before the selected content

0.1

  • Initial release on Github.