WP Engine

Solutions
AgencyEnterpriseSmall & Medium BusinessMarketer
How WP Engine supports marketers.Benefits for marketers.Features that help you innovate.
Developer
How WP Engine supports developers.Benefits for developers.Features that help you move faster.
Explore Our Platform
Insights
Thought LeadershipTopics

Read articles, trends, and insights on these topics from leaders in marketing and technology.

Creative AgilityEnterprise PerformanceActionable IntelligenceEcosystem Integration
Resources

Access ebooks, whitepapers, webinars, and other knowledge from our ecosystem of digital experts.
Visit Resource Center.

Delivering a Slam Dunk Experience on WordPressEbook: The Ultimate Guide to WordPress Plugins15 Common WordPress Mistakes Agencies and their Clients Make
Case Studies
About
Our CompanyOur PlatformLatest News

Access the latest news from inside WP Engine.
Visit the Newsroom.

WP Engine Secures Strategic Growth Investment From Silver LakeWP Engine Unveils First WordPress Digital ExperienceWP Engine Expands Global Presence with New Office in Brisbane
Media Center

Get announcements and resources about WP Engine.

Press Releases
Careers at WP Engine
Pricing
Sales Questions?

Contact Sales

Discover why organizations of all types and sizes choose WP Engine — and how it can benefit you.

Chat

1

I'm available right now to answer any of your questions!

Reply

Call

+1-512-201-4819

Contact

Send a message

Compare Plans
Need Support?
Support DocumentationBilling HelpSupport

We offer support 24 hours a day, 7 days a week, 365 days a year. Log in to get expert one-on-one help.

Log in for support

Sales Questions

Contact Sales

Discover why organizations of all types and sizes choose WP Engine — and how it can benefit you.

Chat

1

I'm available right now to answer any of your questions!

Reply

Call

+1-512-201-4819

Contact

Send a message

Sign in
Sign in
Search

Search

Compare Plans
Call Sales +1-512-201-4819
Menu
AgencyEnterpriseSmall & Medium BusinessMarketers
How WP Engine supports marketers.Benefits for marketersFeatures that help you innovate.
Developers
How WP Engine supports developers.Benefits for developers.Features that help you move faster.
Our PlatformPricingResource CenterOur CompanySolution CenterThought LeadershipDocumentationCareers

Your Shortcode Is Showing!

Ben Fox 9.7.2016

You’ve designed this beautiful WordPress website. Sleek, powerful, professional…everything you ever imagined your dream site could do.

But…something is awfully wrong. It’s written on your Facebook page. You’ve been tweeted at. Tickets have piled up…those dreaded words…”hey, your shortcode is showing!”

Oh the embarrassment! Oh the shame!

As you put a grocery bag over your head, you realize all professionalism is lost.

Ok, maybe this has never happened to you, but to be sure it never occurs, let’s review what a shortcode is, and how you can prevent it from showing on your WordPress site.

What is a shortcode?

Shortcodes were introduced to us in WordPress 2.5. The purpose of shortcodes is to allow us to execute code on posts, pages, etc. without having to directly write code. Instead, we can use these nifty little pieces of code that will execute a larger command out of sight.

Why is it beneficial?

Shortcodes are awesome! Let’s say you want to embed a “Follow Us on Twitter” button at the bottom of your post. Rather than having to embed something like this to follow WP Engine:

<a href="https://twitter.com/wpengine" class="twitter-follow-button" data-show-count="false">Follow @wpengine</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

With a shortcode, you can install and activate the Twitter plugin and do something like this:

[twitter_follow screen_name="wpengine"]

Way easier! Way cleaner!

Why does a shortcode show?

Well this can be a bit of a rabbit-hole.

Shortcodes are executed in WordPress core, so the common reasons your users can see your shortcodes on the front-end of your website include:

  • You have a plugin interfering with the shortcodes
  • You have a theme interfering with the shortcodes
  • You’re somehow running an old enough version of WordPress that doesn’t support shortcodes
  • The shortcode you’re attempting to execute requires an associated plugin you’ve yet to install/activate
  • You’ve made a spelling mistake (more common than you think)
  • If the shortcode can take a src attribute, it’s possible that source can’t be found or that it simply doesn’t exist

There’s many, many more possible situations, but these are common issues with users who are new to shortcodes.

How do you prevent a shortcode from showing?

To prevent shortcodes from appearing to your end-users, all you need to do is preview before publishing. Then when you’re about to publish, save again, and preview changes again…then you may publish.

Plugins like this one can help you hide broken shortcodes from the reader as well. This is great for keeping your shortcode out of your post or page content, but you’ll still be without the functionality you’re seeking from the shortcode. 🙁

What are the downfalls?

Shortcodes are really awesome and super-helpful, but make sure you’re testing them consistently. Sometimes a new update of WordPress can mess with a plugin, and if you’re using that plugin for a specific shortcode…now it’s broken! It’s on you to keep track of your shortcodes and to properly test out your site frequently from a user’s perspective.

How do you get a shortcode to stop from showing?

Check out the Plugin I recommended above and, if you’re new to WordPress, a safe bet is to get your feet wet with the basic WordPress built-in shortcodes such as [video], [gallery], , [caption], and [audio].


ben-fox-flowpressBen Fox is the Co-Founder and CEO of FlowPress, a Toronto-based agency that specializes in WebOps for WordPress. Ben is also the Co-Founder of SIDEKICK, a plugin that provides real-time, voice guided Walkthroughs right inside WordPress.

 

 

More WordPress news from WP Engine

Plugged In: Calendar PluginsTorque Weekly Digest: 9/12/16

Comments

  1. Christopher Glaeser says

    September 11, 2016 at 3:26 pm

    I use the plug-in by Mashshare and use the shortcode [mashshare]. Everything is fine with one exception. When I publish a new post and receive an email copy of the article from WordPress.org, the [mashshare] shortcode is not expanded. Instead, the actual shortcode [mashshare] appears in the email. Any ideas on why this occurs and how to fix it?

    Reply
  2. Ben Fox says

    September 12, 2016 at 1:32 pm

    Hi Christopher,

    Without seeing what’s going on in your wp-admin and without investigating that specific plugin, I can’t give you specific help. Have you tried reaching out to the plugin author? They seem pretty on top of things when it comes to support here: https://wordpress.org/support/plugin/mashsharer

    The good news is, you know which plugin is having issues.

    Good luck and keep us posted!

    Ben

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Subscribe

    Subscribe to our blog to get great tips for your WordPress site.

  • Favorite Tweets by @wpengine
  • Sign In

    Solutions

    • Agency
    • Enterprise
    • SMB
    • Marketer
    • Developer

    Insights

    • Blog
    • Torque
    • Velocitize

    About

    • Our Company
    • Leadership Team
    • Our Platform
    • Careers
    • Affiliates
    • Contact
    • Legal
    • Newsroom
    • Privacy Policy

    Resources

    • Resource Center
    • Documentation
    • Solution Center
    • Find an Agency

    WP Engine

    504 Lavaca Street, Suite 1000
    Austin, TX 78701

    Sales

    +1-512-201-4819
    [email protected]
    7am–7pm CST

    Billing

    [email protected]

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Instagram
    • RSS
    © 2013—2025 WPEngine, Inc. All rights reserved.
    WP ENGINE®, VELOCITIZE®, TORQUE®, EVERCACHE®, and the cog logo service marks are owned by WPEngine, Inc.