Advertisement:

Author Topic: How to make search & menu icons in the mobile view stay on all the pages?  (Read 1125 times)

BritWeb

  • Hero Member
  • *****
  • Posts: 770
  • If it ain't broke, don't fix it.
Hi

Can someone shed some light on as how to make search & menu icons  in the mobile view stay on all the pages and be active. I tried the
Code: [Select]
<?php //if( osc_is_home_page() || osc_is_static_page() || osc_is_contact_page() ) { ?>
    <?php if( == ) { ?>
and they show up on all pages but work only on certain pages.

Many thanks


Code: [Select]
<?php if( osc_is_static_page() || osc_is_contact_page() ){ ?>
 <li class="search"><a class="ico-search icons" data-bclass-toggle="display-search"></a></li>
<li class="cat"><a class="ico-menu icons" data-bclass-toggle="display-cat"></a></li>

ashish1241

  • Jr. Member
  • **
  • Posts: 59
Hey could you please add a screenshot of what it look like and where to embed this code?

osclass_lover

  • Newbie
  • *
  • Posts: 7
Hi,

I have the same problem, and im searching a solution for that. If some one have solution its welcome.

Thanks

osclass_lover

  • Newbie
  • *
  • Posts: 7
Hi,

I think that this function :  bender_draw_categories_list() in line 200 at functions.php in bender theme files the code of function is :

if( !function_exists('bender_draw_categories_list') ) {
        function bender_draw_categories_list(){ ?>
        <?php /*if(!osc_is_home_page()){*/ echo '<div class="resp-wrapper">'; /*}*/ ?>
         <?php
         //cell_3
        $total_categories   = osc_count_categories();
        $col1_max_cat       = ceil($total_categories/3);

         osc_goto_first_category();
         $i      = 0;

         while ( osc_has_categories() ) {
         ?>
        <?php
            if($i%$col1_max_cat == 0){
                if($i > 0) { echo '</div>'; }
                if($i == 0) {
                   echo '<div class="cell_3 first_cel">';
                } else {
                    echo '<div class="cell_3">';
                }
            }
        ?>
        <ul class="r-list">
             <li>
                 <h1>
                    <?php
                    $_slug      = osc_category_slug();
                    $_url       = osc_search_category_url();
                    $_name      = osc_category_name();
                    $_total_items = osc_category_total_items();
                    if ( osc_count_subcategories() > 0 ) { ?>
                    <span class="collapse resp-toogle"><i class="fa fa-caret-right fa-lg"></i></span>
                    <?php } ?>
                    <?php if($_total_items > 0) { ?>
                    <a class="category <?php echo $_slug; ?>" href="<?php echo $_url; ?>"><?php echo $_name ; ?></a> <span>(<?php echo $_total_items ; ?>)</span>
                    <?php } else { ?>
                    <a class="category <?php echo $_slug; ?>" href="#"><?php echo $_name ; ?></a> <span>(<?php echo $_total_items ; ?>)</span>
                    <?php } ?>
                 </h1>
                 <?php if ( osc_count_subcategories() > 0 ) { ?>
                   <ul>
                         <?php while ( osc_has_subcategories() ) { ?>
                             <li>
                             <?php if( osc_category_total_items() > 0 ) { ?>
                                 <a class="category sub-category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>"><?php echo osc_category_name() ; ?></a> <span>(<?php echo osc_category_total_items() ; ?>)</span>
                             <?php } else { ?>
                                 <a class="category sub-category <?php echo osc_category_slug() ; ?>" href="#"><?php echo osc_category_name() ; ?></a> <span>(<?php echo osc_category_total_items() ; ?>)</span>
                             <?php } ?>
                             </li>
                         <?php } ?>
                   </ul>
                 <?php } ?>
             </li>
        </ul>
        <?php
                $i++;
            }
            echo '</div>';
        ?>
        <?php /*if(!osc_is_home_page()){*/ echo '</div>'; /*}*/ ?>
        <?php
        }
    }

Now the problem why this function dont work in all pages, why categories are not displayed in all pages, even if we can display m and s icons in header of all pages.

Thanks
« Last Edit: May 29, 2015, 08:02:38 pm by osclass_lover »