Seo is Dead

  • Seo is Dead
  • SEO Beginners
  • SEO Intermediate
  • SEO Advance
  • Black Hat
  • Link Building
  • Security
  • WordPress
  • Ecommerce
  • Monetize
Home » Blog » How to REMOVE SHORTCODE in WordPress

by seoisdead Leave a Comment

How to REMOVE SHORTCODE in WordPress

In this tutorial we will see how to hide or remove the shortcodes of plugins or themes that you no longer use in WordPress, which are mixed with the content.

What are Shortcodes?

Shortcodes are codes that you can place mixed in with the text of a page or post in WordPress, which when executed on the front-end (the website), are magically replaced by something else.
For example, if I type “npost” in square brackets anywhere, instead of displaying that, it’s automatically replaced by the number of posts in my website. The truth is that shortcodes are very useful and flexible, and we can do everything with them.

The Problem of Shortcodes

However, shortcodes are not all advantages. Shortcodes also require quite a lot of system resources, and if they are abused, we will notice it in the performance of our website. So let’s try to limit their use.
On the other hand, we must differentiate WordPress shortcodes from plugins and themes shortcodes. WordPress has its own shortcodes, like “[ gallery ]” or “[ audio ]”, for example. We will always have those, and there will never be any problems.

But plugin and theme shortcodes are quite dangerous, because their functioning depends precisely on those plugins and themes.

What do I mean by this? Well, if we install a plugin or theme that uses shortcodes, and we use them, the day we stop using it, the content we had disappears and the original shortcode is shown again in brackets.
But be careful! Because in many cases many themes (Divi, and 99% of ThemeForest) or plugins (Divi builder, Visual Composer), make use of these shortcodes without our knowledge. And of course, what happens when we deactivate them. You are left with a gibberish of text and shortcodes everywhere.

Keep Reading this POST:  Plugin CREATE a YOUTUBE Channel Blog

And that’s a problem, as all of this is indexed in Google, it takes a toll on our SEO and also makes navigation impossible, annihilating any possibility of having a good user experience. To solve this, one option would be to go post by post, page by page, content by content, manually editing and deleting each and every one of them. But of course, this is quite time-consuming. So, what do we do with those shortcodes, and how can we solve it quickly? Well, we have two options: Hide them or delete them.

Hide unused shortcodes

The first option is to hide those shortcodes, so that neither users nor Google can see them, to minimise the impact of deactivating them. This is achieved with the Remove Orphan Shortcodes plugin, which hides all shortcodes that no longer exist.

Plugin REMOVE SHORTCODE in WordPress

This plugin is very easy to use. Just install and activate it, and that’s it. All the shortcodes that appear in your content but are not registered by any plugin or theme, will disappear. While this is fine, it’s very convenient and saves us the trouble, it’s still “sweeping the shit under the carpet”, because those shortcodes are still there, in our database, taking up space foolishly. And what’s more, we need an extra plugin to keep everything working. All in all, a bit of a mess. Another alternative option if you don’t want to install that plugin is to do it by code, placing this line in the functions.php file or in your functions plugin:

add_shortcode( ‘shortcode-en-cuestion’, ‘__return_false’ );

Keep Reading this POST:  EventPrime: WordPress BOOKING and Ticketing System

Of course, always changing the red letters of “shortcode-in-question” for the shortcode or shortcodes you want to hide. But once again, it’s just another patch. So after installing the plugin or using the code to save the situation quickly, I recommend that you then proceed to remove those shortcodes.

Delete unused shortcodes

This point is a bit more delicate and “surgical” as we must go shortcode by shortcode, and eliminate them. We will achieve this with the Better Search Replace plugin, which allows us to search and replace any text of any content in WordPress. This plugin is designed to replace content, but we can also use it to remove content if we search for a text and replace it with “nothing”.

IMPORTANT: This is a very powerful tool. And you know: “With great power comes great responsibility”. Technically this means that you can make a big mess if you make a mistake, because this cannot be undone. So please, first of all, make a backup of everything.

Once we have everything secured and backed up, we will select ALL the tables in the list (we can do it with Ctrl+A in Windows or Cmd+A in Mac). and we will proceed to the substitution.
So, click on “Run Search/Replace” and a progress bar like this will appear. Once this has been done, we can check the results, and decide whether to accept the changes or not. We have already got rid of that shortcode. Now we just have to repeat the same with the rest of the shortcodes we know, removing them one by one. Once we have removed them all, we can deactivate and remove both plugins, Better Search Replace and Remove Orphan Shortcodes.
Shortcodes are very useful but they also consume a lot of resources, so we should not abuse them.
In the case that we want to do without a plugin or theme of which we were using shortcodes, we must hide them (patch) or remove them (good solution) so that they are not displayed on our website.

Keep Reading this POST:  How to CUSTOMISE The WORDPRESS DESKTOP in a useful way?

We have hundreds of very interesting posts about WordPress, and online marketing. You can learn the differences between Domain and Hosting or another interesting article is how to customize your wordpress control panel. This way you will have everything more organized.

Related posts:

Plugin CLASSIPRESS ➡ CLASSIFIEDS AND ADS
Create a SCHOOL CALENDAR with WORDPRESS
How To CREATE a WORDPRESS INTRANET
How to UPDATE WORDPRESS Plugins Manually?
SHOW Soccer RESULTS with WORDPRESS

Filed Under: Plugins

Leave a Reply Cancel reply

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

Blog

About

Privacity Polity

Cookie Policy

Site Map

    Copyright © 2023

    We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
    Cookie settingsACCEPT
    Manage consent

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
    CookieDurationDescription
    cookielawinfo-checbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
    cookielawinfo-checbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
    cookielawinfo-checbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
    cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
    cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
    viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
    Functional
    Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
    Performance
    Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
    Analytics
    Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
    Advertisement
    Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
    Others
    Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
    SAVE & ACCEPT