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


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; ?>
  • Not exactly sure what you are looking for. What do you mean by showing the same several times in different places?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.