Osclass forums

Support forums => General help => Topic started by: moinuddin on September 10, 2019, 11:12:34 pm

Title: Subcategories not displayed in mobile bender version.
Post by: moinuddin on September 10, 2019, 11:12:34 pm
Hi,

I have used this plugin and followed instructions about how to put category icons.

Here is the link of plugin and codings.

https://forums.osclass.org/plugins-20/category-icon-plugin/


Its working but now its not showing subcategories in mobile version..

My website is : https://www.myfootwearshop.com.

When you will view as desktop you will see all subcategories ..but if you switch to mobile then you will not see any of the subcategories..

Can anyone help ??
Title: Re: Subcategories not displayed in mobile bender version.
Post by: moinuddin on September 11, 2019, 10:06:32 am
Below is the snapshot attached from admin section where i have made the categories
Title: Re: Subcategories not displayed in mobile bender version.
Post by: moinuddin on September 11, 2019, 06:31:59 pm
Does any one have any idea about what mistake is done which does not show categories in mobile bender theme.
Title: Re: Subcategories not displayed in mobile bender version.
Post by: moinuddin on September 12, 2019, 10:46:44 pm
Does anyone knows about solution?
Title: Re: Subcategories not displayed in mobile bender version.
Post by: moinuddin on September 14, 2019, 12:09:57 am
Can anyone help me ?
Title: Re: Subcategories not displayed in mobile bender version.
Post by: moinuddin on September 16, 2019, 03:04:22 pm
really sad to see that no one in this large forum has idea about it ..

i think some JavaScript toggle button error.

please help me if any one has any idea about how to solve this.

my functions.php file is attached..if any one wants to view the code then please check the attachment.

Title: Re: Subcategories not displayed in mobile bender version.
Post by: moinuddin on September 16, 2019, 03:23:22 pm
 <?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>
                     
                     
                     <!-- start of category icon plugin codes -->
               
               <?php //added by me - category icon ?>
                        <?php if(get_category_icon(osc_category_id())) { ?>
                        <img src="<?php echo get_category_icon(osc_category_id()); ?>" />
                        <?php } ?>
                    <?php //added by me - category icon ?>
       
      
      <!-- end of category icon plugin codes -->
                     
                   
                     
                     
                     
                     
                    <?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-toggle"><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>
                                 
                                 
                                 <!-- start of sub category icon plugin codes -->
                                 
                                 <?php //added by me - category icon ?>
                        <?php if(get_category_icon(osc_category_id())) { ?>
                        <img src="<?php echo get_category_icon(osc_category_id()); ?>" />
                        <?php } ?>
                    <?php //added by me - category icon ?>
                   
                   
                   
                    <!-- end of sub category icon plugin codes -->
                                 
                                 
                                 
                                 
                             <?php if( osc_category_total_items() > 0 ) { ?>
                                 <a onclick="javascript:location.href='<?php echo osc_search_category_url() ; ?>'" 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>
Title: Re: Subcategories not displayed in mobile bender version.
Post by: moinuddin on September 16, 2019, 03:24:14 pm
the above are coding which has only 2 changes from default page ..rest all things are same as default page
Title: Re: Subcategories not displayed in mobile bender version.
Post by: moinuddin on September 16, 2019, 05:10:43 pm
Have even tried this link but its still not showing subcategories.

https://forums.osclass.org/bender/not-working-while-clicking-on-the-category-in-mobile-version/