I’m showing the content a page on an archive page. Here’s the code:
$page = get_page_by_path($post_type); if ($page) { echo apply_filters('the_content', $page->post_content); }
This allows me to create pages with the same slug as a custom post type so I can show that page’s content at the top of the archive page. Works just fine, but the background images do not appear to be showing. When looking at the generated html, I can still see the data-style attribute on the row container, so something’s not getting picked up. It’s on a private dev site right now, so I can’t share it, but I’ll try to get it posted on a public server if that’ll help.
Thanks!
I solved this by using a wp_query to pull up the desired post, at which point just using the_content() worked to show all the Page Builder formatting. So, the working code is:
Hi Jeff,
I would recommend using the following PHP:
Thanks Alex S. Worked like a charm!