*

MB Themes

Re: Hide a specific category from mainpage and search
« Reply #15 on: October 26, 2022, 11:09:25 AM »
In inc.category.php

Code: [Select]
          <div class="line">
            <?php osc_goto_first_category(); ?>
            <?php while(osc_has_categories()) { ?>
      ///// some restriction here ///
              <?php 
                $search_params
['sCategory'] = osc_category_id(); 
                
$color del_get_cat_color(osc_category_id());
              
?>

       
              <a href="<?php echo osc_search_url($search_params); ?>">
                <div>
                  <?php if(del_param('cat_icons') == 1) { ?>
                    <i class="fas <?php echo del_get_cat_iconosc_category_id(), true ); ?>" <?php if($color <> '') { ?>style="color:<?php echo $color?>;"<?php ?>></i>
                  <?php } else { ?>
                    <img src="<?php echo del_get_cat_image(osc_category_id()); ?>" alt="<?php echo osc_esc_html(osc_category_name()); ?>" />
                  <?php ?>
                </div>

                <h3><span><?php echo osc_category_name(); ?></span></h3>
              </a>
            <?php ?>
          </div>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

zawr

  • **
  • 25 posts
Re: Hide a specific category from mainpage and search
« Reply #16 on: October 26, 2022, 06:16:29 PM »
I did exactly the same in inc.category.php -- no result! Not for Category 99, not for some subcategories.

Code: [Select]
<div class="line">
            <?php osc_goto_first_category(); ?>
            <?php while(osc_has_categories()) { ?>
            <?php if (osc_category_id() != 99) { continue; } ?>
            <?php if (in_array(osc_category_id(), array(99,171,172,173,174,175,176,177,185))) { continue; } ?>
              <?php 
                $search_params
['sCategory'] = osc_category_id(); 
                
$color del_get_cat_color(osc_category_id());
              
?>

       
              <a href="<?php echo osc_search_url($search_params); ?>">
                <div>
                  <?php if(del_param('cat_icons') == 1) { ?>
                    <i class="fas <?php echo del_get_cat_iconosc_category_id(), true ); ?>" <?php if($color <> '') { ?>style="color:<?php echo $color?>;"<?php ?>></i>
                  <?php } else { ?>
                    <img src="<?php echo del_get_cat_image(osc_category_id()); ?>" alt="<?php echo osc_esc_html(osc_category_name()); ?>" />
                  <?php ?>
                </div>

                <h3><span><?php echo osc_category_name(); ?></span></h3>
              </a>
            <?php ?>
          </div>

*

MB Themes

Re: Hide a specific category from mainpage and search
« Reply #17 on: October 26, 2022, 06:41:07 PM »
It exclude category on home page, are you aware right?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

zawr

  • **
  • 25 posts
Re: Hide a specific category from mainpage and search
« Reply #18 on: October 26, 2022, 08:14:33 PM »
Yes, I got it. I'm in wrong shoes..

*

vnc

  • **
  • 13 posts
Re: Hide a specific category from mainpage and search
« Reply #19 on: December 10, 2022, 12:55:41 AM »
Some news about our problems? We cannot fix until present our issue. Can someone help us, we buy the epsilon theme also 36 plugins. Please help us with the necessary support.
We need more specific steps in lines of codes or it is possibly access via FTP and help us.

Thank you!

*

MB Themes

Re: Hide a specific category from mainpage and search
« Reply #20 on: December 13, 2022, 02:40:00 PM »
@vnc
I did exactly the same in inc.category.php -- no result! Not for Category 99, not for some subcategories.

Code: [Select]
<div class="line">
            <?php osc_goto_first_category(); ?>
            <?php while(osc_has_categories()) { ?>
            <?php if (osc_category_id() != 99) { continue; } ?>
            <?php if (in_array(osc_category_id(), array(99,171,172,173,174,175,176,177,185))) { continue; } ?>
              <?php 
                $search_params
['sCategory'] = osc_category_id(); 
                
$color del_get_cat_color(osc_category_id());
              
?>

       
              <a href="<?php echo osc_search_url($search_params); ?>">
                <div>
                  <?php if(del_param('cat_icons') == 1) { ?>
                    <i class="fas <?php echo del_get_cat_iconosc_category_id(), true ); ?>" <?php if($color <> '') { ?>style="color:<?php echo $color?>;"<?php ?>></i>
                  <?php } else { ?>
                    <img src="<?php echo del_get_cat_image(osc_category_id()); ?>" alt="<?php echo osc_esc_html(osc_category_name()); ?>" />
                  <?php ?>
                </div>

                <h3><span><?php echo osc_category_name(); ?></span></h3>
              </a>
            <?php ?>
          </div>

Here is way to do it, especially part of code:
Code: [Select]
<?php if (osc_category_id() != 99) { continue; } ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots