[Resolved] Plugin Views (includes and ob_start)
I’m creating my first plugin and I’d like to setup some simple view templates for my front end.
Currently I’m trying something like:
$title = 'Title';
// Start a buffer
// Include your template
// Get the buffer into a variable
$return = ob_get_contents();
// End the buffer
This gets the template just fine, but my $title variable does not carry over into the include like usual. This code works fine outside of the constructs of WP. Any idea what might be causing it?
- The topic ‘[Resolved] Plugin Views (includes and ob_start)’ is closed to new replies.