After installing a WordPress plugin, one of the 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 ideas 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>