Hide This

Hide This

Wordpress plugin

Install on Wordpress

App Details

Hide This provides a [hide] shortcode that lets you hide some parts of the content from your posts and pages. You can easily manage inclusions and exclusions for hidden content in three levels: absolute, groups and capabilities, and specific user.

Maybe some part of your post should not be published yet? Or maybe you want to show some specific parts of your content to a certain group or users, let’s say your logged in users or your clients? This plugin may be the solution you need.

It’s very important to note that the content wrapped within the shortcode won’t even be printed as HTML. It will be really, really hidden. There are a lot of great plugins that hide the content via CSS and Javascript, but this is not the case. If you want your content to not be visible, but still printed as HTML, you should try one of those.

Basic usage:

[hide]Lorem ipsum dolor sit amet.[/hide] 

This example will hide that content for all the site visitors. But you can be more specific by using attributes.

Accepted attributes:

  • for: (optional) your rules to hide content. You can use absolute rules (all, none, [!]logged), rules by roles and capabilities ([!]{role}, [!]{role}:[!]{capability}, :[!]{capability}), and rules by specific user (userid:[!]{ID}, useremail:[!]{email}, username:[!]{username}).
  • exclude: (optional) your rules to show the hidden content to some specific visitor/s. As in for, you can use absolute rules (all, none, [!]logged), rules by roles and capabilities ([!]{role}, [!]{role}:[!]{capability}, :[!]{capability}), and rules by specific user (userid:[!]{ID}, useremail:[!]{email}, username:[!]{username}).
  • test: (optional) for debugging purposes. The kind of output you expect. Accepts content and empty. Use it wisely, because it prints a message with the result of the test.

Some useful examples:

Hide your content to all visitors:

[hide]Lorem ipsum dolor sit amet.[/hide] 

Hide your content to all visitors, except for a specific user:

[hide for="all" exclude="username:foo"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content to all non-logged visitors:

[hide for="!logged"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content to all logged in visitors:

[hide for="logged"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content to all logged in visitors, except for a specific user:

[hide for="logged" exclude="username:foo"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content for some specific role:

[hide for="contributor"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content for two specific roles:

[hide for="editor, contributor"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content for all visitors except for a specific role:

[hide for="!administrator"]Lorem ipsum dolor sit amet.[/hide] [hide for="all" exclude="administrator"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content for all visitors except for two specific roles:

[hide for="!administrator, !editor"]Lorem ipsum dolor sit amet.[/hide] [hide for="all" exclude="administrator, editor"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content for users with a specific role and a specific capability:

[hide for="some_role:do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content for users with a specific role, not having a specific capability:

[hide for="some_role:!do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content for users with a specific capability:

[hide for=":do_a_barrel_roll"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content for a specific user by user name:

[hide for="username:foo"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content for a specific user by user ID:

[hide for="userid:42"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content for a specific user by user email:

[hide for="useremail:[email protected]"]Lorem ipsum dolor sit amet.[/hide] 

Hide your content for everyone except for a specific user by user name:

[hide for="username:!foo"]Lorem ipsum dolor sit amet.[/hide] 

You should get the idea by now. Notice how you can use ! to deny values such as login status, roles, capabilities and user values.

Extending

This plugin offers hooks for filters, so you can modify its functionality or add your own.

  • hide_this_attributes: Modify the attributes that the shortcode receives.
  • hide_this_content: Modify the full content that the shortcode prints.
  • hide_this_hide_rules: Modify rules for hiding content.
  • hide_this_show_rules: Modify rules for showing content.

Contribute

You can make suggestions and submit your own modifications to this plugin on Github.

Pricing

Starting from $0 per month.

Check Out the Image Gallery Widget

By Common Ninja

Image GalleryTry For Free!

App Info

Rating

Reviewers

49 reviews

Tags

capability
content
hide
role
user

Developed By

Andrés Villarreal

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Image Gallery for Wordpress logo

Image Gallery

Showcase photos with an image gallery that displays pictures and captions in grids, improves design, and boosts visitor engagement.

Donation Button for Wordpress logo

Donation Button

Add a donation button that lets users contribute easily using PayPal or Stripe, supporting causes directly from your site.

RSS Feed Carousel for Wordpress logo

RSS Feed Carousel

Show RSS content with an RSS feed carousel that updates automatically, displays posts in a smooth scrolling layout, and keeps visitors engaged.

Payment Button for Wordpress logo

Payment Button

Use a payment button for secure PayPal or Stripe checkout to simplify online payments and help increase sales.

Tripadvisor Reviews for Wordpress logo

Tripadvisor Reviews

Show Tripadvisor reviews to build trust, improve credibility, and help visitors make confident booking decisions that support higher property sales.

Donation Form for Wordpress logo

Donation Form

Collect and manage donations securely with a customizable online donation form that supports Stripe or PayPal and helps increase contributions.

AI Chatbot for Wordpress logo

AI Chatbot

Add an AI chatbot that answers user questions by crawling your site, using uploaded content, and collecting chat interactions.

Restaurant Menu List for Wordpress logo

Restaurant Menu List

Create a clear restaurant menu list that helps visitors explore dishes easily, understand key details, and make confident ordering decisions that support conversions.

Image Stack Gallery for Wordpress logo

Image Stack Gallery

Showcase photos with an image stack gallery that layers images in a stacked display with smooth transitions to create a visually striking presentation.

Pricing Tables for Wordpress logo

Pricing Tables

Add pricing tables to your site to present plans clearly, help visitors compare features, and guide them toward faster and more confident conversions.

Company Branch List for Wordpress logo

Company Branch List

Present all your locations with a clear company branch list that helps customers find nearby offices, understand key details, and enjoy a smoother experience.

Bluesky Feed Carousel for Wordpress logo

Bluesky Feed Carousel

Display Bluesky posts with a Bluesky feed carousel that auto updates, shows posts in a clear layout, and keeps visitors engaged.

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms