We saved some basic HTML as custom meta fields on a custom post. However, when we use the dynamic content tag, it seems to strip out all of the html. Is there anyway to stop this from happening?
We want to use the properly formatted content within an accordion.
Thanks for reaching out.
It depends on the Dynamic Tag you are using, in the case of an excerpt and a few content tags strip the HTML tags, the rest return the value as it is. If you still have the problem, I would suggest you create a custom dynamic tag and return the value you want.
Please go through the following thread where custom dynamic tag creation is explained.
Please remember that the above code will work if copied as it is and doesn’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We really do not provide support for custom codes which means we can’t fix it in case it conflicts with something on your site nor will we enhance it. Further customization should be directed to a third-party developer or you can avail of One, where we answer the questions beyond normal theme support.
You can get the HTML output from the meta field using the Dynamic Tag. As an example, I have added two screenshots, that prove you can get the HTML data using the Dynamic Tags.