Osclass Support Forums

Osclass theme support => Sigma Osclass Theme => Topic started by: mheston on November 29, 2021, 08:35:40 AM

Title: Custom search sidebar and show filters
Post by: mheston on November 29, 2021, 08:35:40 AM
I added a background color to the search sidebar in css "refine". It looks good on desktop but when viewed on mobile "show filters" it aligns the text to the left to far. any ideas on how to move the text to the right a little on "show filters".
Title: Re: Custom search sidebar and show filters
Post by: mheston on November 29, 2021, 08:56:32 AM
Fixed it.
Title: Re: Custom search sidebar and show filters
Post by: mheston on November 30, 2021, 02:12:31 AM
I would also like to change the Search sidebar menu so that when I click on computers category it stays the same. I have been trying to do this with functions.php in this section.


  echo '<li><a href="'.osc_esc_html(osc_update_search_url(array('sCategory'=>null, 'iPage'=>null))).'">'.__('', 'sigma')."</a></li>";
    }
    foreach($c as $key => $value) {
  ?>
      <li>
        <a id="cat_<?php echo osc_esc_html($value['pk_i_id']);?>" href="<?php echo osc_esc_html(osc_update_search_url(array('sCategory'=> $value['pk_i_id'], 'iPage'=>null))); ?>">
        <?php if(isset($current_category) && $current_category == $value['pk_i_id']){ echo '<strong>'.$value[''].'</strong>'; }
        else{ echo $value['s_name']; } ?>
        </a>

      </li>
  <?php
    }
    if($i==1) {
    echo "</ul>";
    } else {
    echo "</ul>";
    }
  } else {
  ?>
  <ul <?php echo $class;?>>
    <?php if($i==1) {
      echo '<li><a href="'.osc_esc_html(osc_update_search_url(array('sCategory'=>null, 'iPage'=>null))).'">'.__('', 'sigma')."</a></li>";
    }
    foreach($c as $key => $value) {
  ?>
      <li>
        <a id="cat_<?php echo osc_esc_html($c['pk_i_id']);?>" href="<?php echo osc_esc_html(osc_update_search_url(array('sCategory'=> $c['pk_i_id'], 'iPage'=>null))); ?>">
        <?php if(isset($current_category) && $current_category == $c['pk_i_id']){ echo '<strong>'.$c[''].'</strong>'; }
            else{ echo $c['s_name']; } ?>
        </a>
        <?php sigma_print_sidebar_category_search($aCategories, $current_category, $i); ?>
      </li>
Title: Re: Custom search sidebar and show filters
Post by: MB Themes on November 30, 2021, 07:10:45 PM
@mheston
Theme is designed in way it want to REFINE categories. It also states that it is refine.

Maybe changing this line:
Code: [Select]
        <?php sigma_print_sidebar_category_search($aCategories$current_category$i); ?>

Into this:
Code: [Select]
        <?php sigma_print_sidebar_category_search($aCategoriesNULL$i); ?>

will do the trick, not sure, it require testing.
Title: Re: Custom search sidebar and show filters
Post by: mheston on December 03, 2021, 10:20:45 AM
I am trying to add some text to the menu. when I click on a sub category I want to make it say ' Go back to Vehicles' any idea how to do this. I think this might be the code I need to modify but not sure.

<li>
        <a id="cat_<?php echo osc_esc_html($value['pk_i_id']);?>" href="<?php echo osc_esc_html(osc_update_search_url(array('sCategory'=> $value['pk_i_id'], 'iPage'=>null))); ?>">
        <?php if(isset($current_category) && $current_category == $value['pk_i_id']){ echo '<strong>'.$value['s_name'].'</strong>'; }
        else{ echo $value['s_name']; } ?>
        </a>

      </li>
Title: Re: Custom search sidebar and show filters
Post by: MB Themes on December 03, 2021, 02:53:55 PM
@mheston
If you are looking for parent ID, you can get it from $value['fk_i_parent_id'] most probably.
Title: Re: Custom search sidebar and show filters
Post by: mheston on December 03, 2021, 03:03:48 PM
I added the text. I changed this -

   else{ echo $c['s_name']; } ?>

  to this -

  else{ echo 'Go back to - <strong>'.$c['s_name'].'</strong>'; } ?>

  not sure if it is correct but it seems to be working ok, would you know where in style.css I can move the main category title to
  the right some so it lines up with the sub categories.
Title: Re: Custom search sidebar and show filters
Post by: MB Themes on December 03, 2021, 03:14:30 PM
That is hard to say just on the fly