shortcodes getting reformatted by wp

Hi I have a client site http://healthinnovationproject.org using custompress for taxonomies and custom fields and using visual builder to create the in page content layout with custom press shortcodes pulling the data into the page layout.

I have one custom field with a url in and needed to repeat the shortcode within HTML link code to generate a clickable link. When the client edits the page each time the link code contain shortcode inside of href attribute breaks.

WP also sometimes reformats the visual builder layout code.

I'm trying to figure out how to preserve the exact code and shortcode setup in the main editor without it being tampered with by WP. All the usual preserve code and raw HTML plugins don't work in this case.

Brief Outline
http://the-colab.clarify-it.com/d/xxcjtq

Any ideas

PS I only added this site to wpmudev dashboard now so it wasn't available when I started this ticket to add as the site.

  • Patrick

    Hi there @nomadone

    I hope you're well today!

    Yah, I've noticed that from time to time, the layout created in Visual Builder gets modified when editing, especially when shortcodes are used.

    One thing jumped out at me when looking at your screenshots: double-quotes nested inside other double-quotes will definitely break things. :slight_smile:

    This part in particular won't work:
    <a href="[ct id="ct_website_text_6c1e"]">

    Try replacing either set of double-quotes with single-quotes, like so:
    <a href='[ct id="ct_website_text_6c1e"]'>

  • nomadone

    Thanks a ton Patrick

    I actually purchased the templatera add-on for Visual Builder and moved the template into a Templatera template which I believe will prevent editing the age from breaking shortcodes seeing the template shortcodes are housed elsewhere.

    Thanks for the tip on the quote marks.

    I know the setup is less than ideal, but I'm working with tight constraints, changing requirements and don't have a huge budget for building it out from scratch as proper templates at this point.