*

salahjoher

  • **
  • 21 posts
regions are limited to 9 only on Sigma Theme
« on: August 04, 2023, 04:33:43 PM »
regions are limited to 9 only on Sigma Theme , What is the problem with the code? i have 12 regions, how can i view them all...?

My site: https://jordanindex.net

this is the code of the side bar,

<div id="sidebar">
  <?php if( osc_get_preference('sidebar-300x250', 'sigma') != '') { ?>
    <div class="ads_300"><?php echo osc_get_preference('sidebar-300x250', 'sigma'); ?></div>
  <?php } ?>

  <div id="home-regs">
    <h2><?php _e('All locations', 'sigma'); ?></h2>

    <div class="wrap">
      <?php $regions = RegionStats::newInstance()->listRegions('%%%%', '>', 'i_num_items DESC'); ?>

      <?php $i=1; ?>
      <?php foreach($regions as $r) { ?>
        <?php if($i <= 20) { ?>
          <div><a href="<?php echo osc_search_url(array('page' => 'search', 'sRegion' => $r['pk_i_id']));?>"><i class="fas fa-location-arrow"></i> <span><?php echo $r['s_name']; ?></span> <em>(<?php echo $r['i_num_items']; ?>)</em></a></div>
          <?php $i++; ?>
        <?php } ?>
      <?php } ?>

    </div>
  </div>
</div>

*

salahjoher

  • **
  • 21 posts
Re: regions are limited to 9 only on Sigma Theme
« Reply #1 on: August 04, 2023, 05:31:40 PM »
the strange thing, it works fine in responsive mode.

i find this in style.css

home-regs .wrap > div:nth-of-type(1n+10) {display:none;}

and i have changed it to be:

home-regs .wrap > div:nth-of-type(1n+10) {display:block;}

now it works for me...

i don't know if this modification will be correct on all cases...

any comments...? am i correct?

*

MB Themes

Re: regions are limited to 9 only on Sigma Theme
« Reply #2 on: August 08, 2023, 08:40:01 AM »
Yes it may not include all the regions if there is many of them, so some are hidden by CSS here.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots