does not work with the_sub_field (ACF) / get_template_part ()
-
I have a website with ACF fields and content parts. Unfortunately, it doesn’t work and no glossary links are displayed. Even after I bought the PRO version it doesn’t work. Here is the code snippet that is involved.
<?php if (have_posts()) : while ( have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <div class="wrapper headline-<?php echo get_field('inhaltsblocke')[0][acf_fc_layout]; ?>"> <?php if(get_field('seitenuberschrift')) { ?> <h2><?php the_field('seitenuberschrift'); ?></h2> <?php } ?> </div> <?php if( have_rows('inhaltsblocke') ): while ( have_rows('inhaltsblocke') ) : the_row(); if( get_row_layout() == '1-spalter' ): get_template_part( 'part/part', '1-spalter' ); elseif( get_row_layout() == '2-spalter' ): get_template_part( 'part/part', '2-spalter' ); elseif( get_row_layout() == '3-spalter' ): get_template_part( 'part/part', '3-spalter' ); elseif( get_row_layout() == 'bildunterbrechung' ): get_template_part( 'part/part', 'bildunterbrechung' ); elseif( get_row_layout() == 'leistungen' ): get_template_part( 'part/part', 'leistungen' ); elseif( get_row_layout() == 'team' ): get_template_part( 'part/part', 'team' ); elseif( get_row_layout() == 'teaser' ): get_template_part( 'part/part', 'teaser' ); endif; endwhile; endif; ?> </div> <?php endif; ?>
Can you help me please?
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘does not work with the_sub_field (ACF) / get_template_part ()’ is closed to new replies.