Search code examples
wordpresssharingvisual-composer

Get rid of visual composer tags when sharing a wordpress page


I have created some pages in wordpress using Visual Composer Plugin. When I try to share those pages on social media sites it shows the visual composer tags as well. Is there any way to get rid of these tags ?

The tags come like

MY PAGE TITLE
[vc_row type=
my page text

Solution

  • The Visual Composer tags are simply arbitrary bits of text that the VS framework picks up and via JavaScript converts into the visual layout that you see.

    To demonstrate this edit a page and click the 'Classic Mode' button and this will show you the 'real' content / markup of your page. As a result when sharing the page via social media that network looks for key info to grab for your page to then display.

    All the major networks have some form of metadata that they look for first. They use these special tags to see what content you want them to use for your site. If these tags aren't present on your site, they will simply grab content from the page markup. Hence, the Visual Composer tags get picked up.

    So, what you need to do is make your site use the necessary metadata / tags for each of the networks, and then populate these fields without these Vis Composer tags.

    The easiest way to do this is to use an existing plugin which takes care of this for you. You typically find this in any decent SEO software. You'll in 99.9% of cases want an SEO plugin for WordPress anyway.

    By far the most popular and in my experience the best SEO plugin is Yoast SEO. It's a free plugin which not only gives great easy to use SEO tools, it also allows you to set custom description fields for pages/ posts. This means that you can remove the VC tags, and so they will no longer show up on Search Engines and Social Networks. Plus depending on which version you use, you can also customise things on a per social network basis.

    Facebook and Twitter etc all use heavy caching against shared content. So, if a page is shared and then edited, the same content will still be shared for a period of time. They don't actually grab live copies every time a page is shared. This can make it a little difficult when developing this side of your site.

    Luckily, there is a tool to help with Facebook and here's the one for Twitter.