How sort ACF loyout in admin and output in the right order on the site

How sort ACF loyout in admin and output in the right order on the site

Approved. Code works!
This is exactly the working code that is verified by the moderator or site administrators
<?php
get_header('home');
?>

<main>

    <?php

    if (have_rows('careers_page', 'option')) :

        while (have_rows('careers_page', 'option')) :
            the_row();

            $layout = get_row_layout();

            switch ($layout) {
                case 'careers_promo':
                
                    get_template_part('template-parts/pages/sections/promo', 'none');
                    break;

                case 'open_positions':
                        echo 'positions';
                    break;

                case 'about_us':
                    echo 'about';
                    break;
            }

        endwhile;

    else :
        echo esc_html_e('Empty, go to settings', 'kiplar');
    endif;

    ?>

</main>

<?php get_footer(); ?>

0

More

Leave a Reply

Your email address will not be published. Required fields are marked *

How many?: 22 + 22

lil-code© | 2022 - 2024
Go Top
Authorization
*
*
Registration
*
*
*
*
Password generation