I’m using WP as a CMS. I’ve got multiple pages that share the same header.
group 1 has header 1. group 2 has header 2. etc.
I’ve looked at these two plugins for a quick way to insert a combination of html and shortcodes.
http://wordpress.org/extend/plugins/wp-include-file/
http://wordpress.org/extend/plugins/post-snippets/
Both solutions are neat, but they do not process the short codes.
Example:
<div id="bugs2">
</div>
Does anyone know of an alternative way to embed or include this code from an external file (in an include folder on the server) and have the shortcodes processed?
Thanks!
I have done this before with wp-include-file
you need to edit the file called wp-include-file.php in the plugin`s directory
look at line 144 and replace:
with
that`s it.
hope this helps.
Didn’t test it but rather than editing plugin file it might be more convenient to wrap its call in your own function and re-register shortcode. Something like this:
My plugin get-post should handle this. It allows you to include posts in other posts/pages and will go ahead and process plugins during this inclusion. It should allow for a little bit of recursion as well 🙂