Shortcodes in posts that are displayed in page templates
I friend who has a large number of sales landing pages, each with a unique intro and a shared main content body. I’ve made the management of these easier by creating a bunch of templates as follows: Each template pulls in a unique post for the introduction, and then pulls in another common post for the main body. This works great, except when it comes to running plugin shortcodes in either of the posts that are queried and displayed in a template. The shortcodes work when viewing the actual post, but when you view the page that uses the template that queries and displays this post, the shortcodes fail.
Specifically, I need to make it so he can use shortcodes to embed a video using a video player plugin.
I was thinking of adding a plugin to allow PHP in posts/pages and then instructing my friend to wrap each shortcode in do_shortcode().
This just seems messy. Are there any other ways of doing this? Thanks for any advice.
- The topic ‘Shortcodes in posts that are displayed in page templates’ is closed to new replies.