acf page builder
Thu Jul 17 2025 12:00:47 GMT+0000 (Coordinated Universal Time)
Saved by
@BilalRaza12
get_header();
if( get_field('page_builder') ){
$page_builder = get_field('page_builder');
//echo print_r( $page_builder);
foreach ($page_builder as $key => $section) {
include('builder-section/inc-'.$section['acf_fc_layout'].'.php');
}
} else{?>
<main id="primary" class="site-main">
<?php
if ( have_posts() ) while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
endwhile; // End of the loop.
?>
</main><!-- #main -->
<?php
get_sidebar();
}
get_footer();
content_copyCOPY
Comments