I'm writing a shortcode for a child-theme.
I want to load a php template file to generate my HTML and then output this HTML in a string to return this string. But I don't know the best way to do this. The Codex mentions the
ob_start function but it seems to me a bit dirty.
Are there any template functions (like those in PHP frameworks when you load a view) to do this?