I have a custom post type (event) with a template file for showing single posts (single-event.php). That’s working fine.
I want to show some information on every single posts pages, build with the page builder, like a footer which is the same on every event page. I made a page called ‘footer’ and designed that with the Page Builder. When I insert that page in the template file with this code I don’t get the Page Builder styling:
$post = get_post($id); $content = $post->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); echo $content;
Is it possible to add a page in a template file like that? Or is there a better way to get this result?
Hi Wenkunst,
We recommend rendering SiteOrigin Page Builder directly if you’re outputting SiteOrigin Page Builder outside of the loop. Here’s an example of the code I typically recommend to do this:
Perfect! That’s what I was looking for :)
Hi Wenkunst,
Great to hear that helped! :)
Please be sure to post another thread if you have any other questions.