Slider wordpress broke and I can not fix

Asked

Viewed 27 times

0

After installing a Wordpress plugin, one of sliders that contains logos is no longer visible. Instead, this error appears :

"Warning   /data/32/1/78/108/1567271/user/1688151/htdocs/wp-content/themes/mogi/page-templates/index-page.php  
: Invalid argument supplied for foreach() in on line 136"

Any idea how to solve this problem?

This is the code for the slider:

<?php
        $our_clients = 18;

        $logos = get_post_galleries_images($our_clients);
        ?>
        <div class="container">
            <div class="logos_wrapper">
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active"><a href="#gaming_clients" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Gaming Clients', 'mogi');?></a></li>
                    <!--<li role="presentation"><a href="#our_clients" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Clients', 'mogi');?></a></li>-->
                </ul>

                <div class="tab-content">
                    <div role="tabpanel" class="tab-pane active" id="gaming_clients">
                        <div class="logos">
                            <?php
                            $counter = 0; 
                            foreach ($logos[0] as $logo){
                                $counter++;
                                echo $counter==1 ? '<div>' : '';
                                ?>

                                <div class="vertical-align"><img src="<?php echo $logo;?>"/></div>

                                <?php echo $counter==2 ? '</div>' : ''; ?>
                                <?php $counter = $counter==2 ? 0 : $counter; ?>
                            <?php }

                            if ($counter!=0) echo '</div>';?>
                        </div>
                    </div>
                    <div role="tabpanel" class="tab-pane" id="our_clients">
                        <div class="logos">
                            <?php
                            $counter = 0; 
                            foreach ($logos[1] as $logo){
                                $counter++;
                                echo $counter==1 ? '<div>' : '';
                                ?>

                                <div class="vertical-align"><img src="<?php echo $logo;?>"/></div>

                                <?php echo $counter==2 ? '</div>' : ''; ?>
                                <?php $counter = $counter==2 ? 0 : $counter; ?>
                            <?php }

                            if ($counter!=0) echo '</div>';?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
  • It would be better to uninstall the plugin or restore the backup of . phps from before installation.

  • I wish I could continue with the plugin, and I don’t have backup of the files. I’m crawling in web development =/

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.