Support

Account

Home Forums Add-ons Flexible Content Field Using a layout multiple times

Unread

Using a layout multiple times

  • Hello, I have flexible content from several blocks. In the admin panel, I can add any block several times, but on the page it is displayed only once. Is it possible to display the same block several times on the page in different places (if so, how).

    <?php if (have_rows('page_builder_service')): ?>
            <?php while (have_rows('page_builder_service')): the_row(); ?>
    
                <?php if (get_row_layout() == 'layout_1'): ?>
                    <?php get_sidebar('sidebar_1'); ?>
    
                <?php elseif (get_row_layout() == 'layout_2'): ?>
                    <?php get_sidebar('sidebar_2'); ?>
    
                <?php elseif (get_row_layout() == 'layout_3'): ?>
                    <?php get_sidebar('sidebar_3'); ?>
    
                <?php elseif (get_row_layout() == 'layout_4'): ?>
                    <?php get_sidebar('sidebar_4'); ?>
    
                <?php elseif (get_row_layout() == 'layout_5'): ?>
                    <?php get_sidebar('sidebar_5'); ?>
    
                <?php endif; ?>
            <?php endwhile; ?>
        <?php endif; ?>
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.