Hide or Remove [rev_slider alias="norevslider"]
Hide or Remove — full guide (what it does, why it appears, and step-by-step how to apply safely)
1) Quick summary — recommended approach
Best practice: Add the PHP snippet to your theme’s functions.php or install the free Code Snippets plugin and add it there.
Why not header.php: header.php is not the right place for site-wide PHP that registers shortcodes; putting this in header risks syntax errors and will run at the wrong time. Use functions.php (child theme) or Code Snippets.
2) Recommended PHP — block everywhere
Put this in your child theme functions.php or create a new snippet in the Code Snippets plugin:
Notes:
-
The
shortcode_existscheck avoids overriding if the plugin is active (but if the plugin is active, the real shortcode likely exists so this code will not run). -
Save the file and reload your site — the raw
text should disappear.
3) Limit hiding to only the homepage
If you want to hide the shortcode only on the homepage (so other pages with sliders still work):
4) If you must paste something in header (JS method)
If you do not want to edit PHP or prefer a header-only change, add this JavaScript into Appearance → Customize → Additional Scripts, or into your header script area of a header/footer plugin (this is safe to paste as-is):
Pros: No PHP edits.
Cons: JS runs after page load (flash of content may appear briefly), and it’s a hide (not a fix).
5) CSS-only attempt (less reliable)
CSS :contains() is not standard and usually won’t work. Don’t rely on it. If the shortcode is inside a known wrapper, you can hide by selector — but that requires knowing the HTML structure.
6) Where to add the PHP safely — step-by-step
Option A — Using Code Snippets plugin (recommended for non-developers)
-
Install Code Snippets plugin (Plugins → Add New → search “Code Snippets”).
-
Activate it.
-
Go to Snippets → Add New.
-
Give it a title (e.g. “Disable rev_slider shortcode”).
-
Paste the PHP from section 2 (without the opening
<?phpif the UI adds it) and select Run snippet everywhere. -
Save and activate the snippet.
Option B — Edit child theme functions.php
-
Use FTP / SFTP / File Manager or Appearance → Theme File Editor (only use Theme Editor if you’re comfortable).
-
If you don’t already have a child theme, create one or use Code Snippets instead — don’t edit the parent theme (updates will overwrite).
-
Open
functions.phpand paste the PHP snippet at the end (before?>if present). -
Save and test your site.
Before changing files: always make a full backup or at least copy the current functions.php contents to your computer.
7) Why the text appears
-
Most likely the Slider Revolution plugin (or the specific slider alias) is missing, inactive, or the shortcode isn’t being processed where it was placed. When WordPress does not recognize/process a shortcode it prints it as plain text.
-
Other causes:
-
The shortcode is placed in an area that doesn’t run shortcodes (some widgets or theme areas may not call
do_shortcode()). -
The plugin was removed or disabled after the shortcode was added.
-
The alias
norevsliderdoes not exist in Slider Revolution.
-
-
The correct long-term fix is to either re-install/activate the plugin, correct the alias, or remove the shortcode from the page content.
8) Fix vs hide — what to choose
-
Fix (recommended): Reinstall/activate Slider Revolution, or remove the shortcode from the page/post/widget where it’s used. This solves the root cause and does not hide potentially needed content.
-
Hide (what you asked for): Use the PHP snippet (site-wide) or the conditional PHP (homepage only) — this prevents the raw shortcode text from being printed.
-
Temporary frontend hide: Use the JS snippet if you cannot edit PHP.
9) Troubleshooting & tips
-
If after adding PHP you get a blank site or “500 error” — remove the code immediately (restore backup). Syntax mistakes break PHP. Use Code Snippets to avoid this risk.
-
Prefer a child theme or Code Snippets — never edit parent theme files directly.
-
Test in an incognito window and clear caches (page cache / plugin cache / CDN) after changes.
-
If you want the slider to actually show, re-install Slider Revolution and make sure the slider alias
norevsliderexists in the plugin dashboard.
10) Final note you can add to your video description (copy/paste)
Hide or Remove from your website
If your site is showing the raw shortcode text, it means WordPress isn’t processing the Slider Revolution shortcode (plugin missing, alias not found, or shortcode placed where shortcodes aren’t processed). To hide it safely, add a small PHP snippet to your site (preferably via the Code Snippets plugin or a child theme’sfunctions.php) which returns nothing for therev_slidershortcode. This completely prevents the shortcode text from being output. If you want to fix the root cause instead, reinstall/activate Slider Revolution or remove the shortcode from the page where it’s used. Always back up your site before editing theme files.Watch the YouTube video below to see a real-life example and learn exactly how to fix this issue step-by-step.

Leave a Comment