0

I am getting this message: PHP message: PHP Parse error: syntax error, unexpected 'endwhile' (T_ENDWHILE), expecting elseif (T_ELSEIF) ir else (T_ELSE) or endif (T_ENDIF) in .... while reading response header from upstream, ..................... Can anyone help me finding where i made the mistake? I can't seem to find the place where i made the mistake.

<?php

if ($data['choose_table_options'] === '1') {

    $ids = $data['select_a_items_in_table'];



    $get_items = new WP_Query(

        array(

            'post_type' => 'post',

            'post__in'  => $ids,

            'orderby'   => 'post__in'

        )

    );
} else if ($data['choose_table_options'] === '2') {

    $posts_per_page = $data['number_of_items_in_table'];



    $get_items = new WP_Query(

        array(

            'post_type'      => 'post',

            'post_status'    => 'publish',

            'meta_query' => array(

                'relation' => 'OR',

                array(

                    'key' => 'exclude_casino_list',

                    'compare' => '==',

                    'value' => '0',

                    'type' => 'BOOLEAN'

                ),

                array(

                    'key' => 'exclude_casino_list',

                    'compare' => 'NOT EXISTS'

                )

            ),

            'posts_per_page' => $posts_per_page

        )

    );
}





if ($get_items->have_posts()) :

    $myFuctions = new DeD_MyFunctions();



    if (isset($atts['index'])) {

        $index = $atts['index'];
    } else {

        $index = $atts['id'];
    }

?>



    <div class="top-items bg-f9f9f9 pb-lg-75 pb-md-50">

        <?php if (!empty($data['title'])) : ?>

            <div class="container">

                <h2 class="h1 text-uppercase text-primary text-center py-25"><?php echo $data['title']; ?></h2>

            </div>

        <?php endif; ?>



        <div class="item-row bg-white d-sm-block d-none">

            <div class="container">

                <div class="row align-content-stretch no-gutters">

                    <div class="col col-auto py-sm-15">

                        <div class="pos"></div>

                    </div>



                    <div class="col col-auto py-sm-15">

                        <div class="logo">
                            <p class="h3 text-gray-500 text-uppercase text-center"><?php _e('item', 'modular'); ?></p>
                        </div>

                    </div>



                    <div class="col col-auto py-sm-15">

                        <div class="raty align-self-center">
                            <p class="h3 text-gray-500 text-uppercase text-center"><?php _e('Rating', 'modular'); ?></p>
                        </div>

                    </div>



                    <div class="col col-auto py-sm-15">

                        <div class="devices"></div>

                    </div>



                    <div class="col py-sm-15 px-lg-30">

                        <p class="h3 text-gray-500 text-uppercase"><?php _e('Bonus', 'modular'); ?></p>

                    </div>



                    <div class="col col-auto py-sm-15">

                        <p class="h3 text-gray-500 w-110 text-uppercase text-center"><?php _e('Action!', 'modular'); ?></p>

                    </div>

                </div>

            </div>

        </div>



        <?php

        $i = 1;

        while ($get_items->have_posts()) : $get_items->the_post();

            $data_main_fields = $myFuctions->get_review_main_fields();

            $data_group_fields = $myFuctions->get_reviews_group_fields();

        ?>



            <div class="item-row">

                <div class="container">

                    <div class="row align-content-stretch no-gutters">

                        <?php if (get_field("ribbon_enabled")) : ?>

                            <div class="rib" style="background-color:<?php echo get_field("ribbon_color"); ?>"><?php echo get_field("ribbon_text"); ?></div>

                        <? endif; ?>

                        <div class="col col-auto bg-white d-flex py-sm-15">

                            <div class="align-self-center cuprum text-center text-gray-600 pos"><strong><?php echo $i; ?></strong></div>

                        </div>



                        <div class="col col-sm-auto d-sm-flex py-sm-15">

                            <div class="logo align-self-center">

                                <?php if (has_post_thumbnail()) : ?>

                                    <figure class="thumb thumb-top-item mx-auto">

                                        <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('top-item'); ?></a>

                                    </figure>

                                <?php else : ?>

                                    <figure class="thumb thumb-top-item mx-auto">

                                        <a href="<?php the_permalink(); ?>"><?php echo do_shortcode("[ild item='" . $data_main_fields['review_name'] . "' data='logo']"); ?></a>

                                    </figure>

                                <?php endif; ?>

                            </div>

                        </div>



                        <div class="d-block d-sm-none" style="width: 100%"></div>



                        <div class="col-sm-auto col-6 d-sm-flex py-sm-15 py-5">

                            <div class="raty raty-read-only align-self-sm-center text-center" data-score="<?php echo $data_main_fields['review_rating']; ?>"></div>

                        </div>



                        <div class="col-sm-auto col-6 d-sm-flex py-sm-15 py-5">

                            <div class="align-self-sm-center devices text-center">

                                <?php $myFuctions->the_review_devices(); ?>

                            </div>

                        </div>



                        <div class="col-sm col-12 d-sm-flex py-sm-15 py-5 px-lg-30 px-sm-15">

                            <div class="align-self-center bonus text-sm-left text-center"><strong><?php $myFuctions->the_review_bonus(); ?></strong></div>

                        </div>



                        <div class="col-sm-auto col-12 d-sm-flex py-sm-15 pt-5 pb-15">

                            <div class="align-selfs-sm-center d-flex flex-sm-column align-items-center justify-content-center">

                                <a href="<?php echo $data_main_fields['review_url']; ?>" target="_blank" class="btn btn-success mb-sm-10 mr-sm-0 mr-10"><?php _e('Play', 'modular') ?></a>

                                <a href="<?php echo the_permalink(); ?>" class="text-primary cuprum-bold text-uppercase text-center"><?php _e('Preview', 'modular') ?></a>

                            </div>

                        </div>

                    </div>

                </div>

            </div>



        <?php

            $i++;

        endwhile;

        ?>

    </div>



<?php endif;
wp_reset_query();
kr7
  • 1
  • 2

0 Answers0