0
votes

I'm trying to mesh Mustache Templating Engine with WordPress. So far, I have been very successful using the_content as a filter to parse my template tags e.g. {{ something }}.

However, if let’s say, a developer hardcodes the template tags directly into the page template e.g. loop-page, the_content doesn’t capture the hardcoded tags.

Is there a filter that will allow me to capture the content of the whole page template including the content?

1

1 Answers

2
votes

If you're writing a plugin, you can use PHP function ob_start() to cache whole buffered content. After that you can use callback function to return replaced content.

Use triggers (action's) init or after_setup_theme for your script.