0

So I created a custom page in dashboard with a tinyMCE editor that can save html in a table row that i created in wp db.

I am also able to output the html on a custom template page. However the shortcodes I write in the tinyMCE (ex [phone]) will display as plain text and not the data it was supposed too.

I know outside the default content editor and in template page you will normally display the shortcode with

echo do_shortcode('[phone]');

but I cannot write this into the tinyMCE editor.

How can I get the shortcodes to work?

Best Regards Shane Akira

1 Answer 1

0

Oh, I didn't thought it would be that easy.

So when I am storing the html in a variable "$htmlContent" and echo the variable in my template I can just wrap the variable in the do_shortcode() function

echo do_shortcode($htmlContent);

Maybe this answer are useful for other with the same problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.