*

diverk

  • **
  • 12 posts
How to display child categories on main category's page
« on: February 07, 2023, 06:45:24 PM »
Is there a code to show the child categories (icons with names) under each main category's page, to be displayed above the(## results found in For sale ), as in the attached image.





*

MB Themes

Re: How to display child categories on main category's page
« Reply #1 on: February 08, 2023, 07:49:01 PM »
Similar piece is in sidebar.
Why not to use it?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Re: How to display child categories on main category's page
« Reply #2 on: February 17, 2023, 07:08:25 PM »
Similar piece is in sidebar.
Why not to use it?

can you plz explain in more details ??
 and one question plz
 how can i make main categories sort like DELTA theme ??

*

diverk

  • **
  • 12 posts
Re: How to display child categories on main category's page
« Reply #3 on: February 18, 2023, 12:02:47 PM »
how can i enable child category icons in side menu, is there an option that i missed in category settings?

Thnx

*

MB Themes

Re: How to display child categories on main category's page
« Reply #4 on: February 25, 2023, 01:54:28 PM »
You cannot.
Either you develop that feature, or it will not be there.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

diverk

  • **
  • 12 posts
Re: How to display child categories on main category's page
« Reply #5 on: February 25, 2023, 04:49:34 PM »
any reliable developer within this forum can write this code if it's simple for a cup of coffee? 

*

MB Themes

Re: How to display child categories on main category's page
« Reply #6 on: February 25, 2023, 05:20:43 PM »
Cannot be done without testing.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Lui-G

  • *
  • 2 posts
Re: How to display child categories on main category's page
« Reply #7 on: February 28, 2023, 06:59:06 PM »
hi

Open search.php and go to line 311

Change from:

<div>
<span class="name"><?php echo $c['s_name']; ?></span>
<?php echo ($c['i_num_items'] > 0 ? '<em>' . $c['i_num_items'] . '</em>' : ''); ?>
</div> 


To:

<div>
<?php if($search_cat_id != 0) { ?>
<img id="cattumbs" src="<?php echo eps_get_cat_image($c['pk_i_id']); ?>" alt="<?php echo osc_esc_html($c['s_name']); ?>" />
<?php } ?>
<span class="name"><?php echo $c['s_name']; ?></span>
<?php echo ($c['i_num_items'] > 0 ? '<em>' . $c['i_num_items'] . '</em>' : ''); ?>
</div>


And add to your custom css:

#cattumbs {
    max-width: 14px;
    margin: 0 5px 0 0;
}
#search-category-box a.child.active span::before {
    content: '> ';
    font-weight: bold;
    font-size: larger;
}
#search-category-box a.child.active span {
    background: rgb(59 73 223 / 10%);
    text-decoration: unset;
    padding: 2px 8px 2px 2px;
    border-radius: 5px;
}




If you like a better looking category box add this to your custom css

#search-category-box {
    position: relative;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 16px;
    margin: 0 0 16px 0;
}


Thx for the coffee ;)

 ;D


Lui-G

*

diverk

  • **
  • 12 posts
Re: How to display child categories on main category's page
« Reply #8 on: March 03, 2023, 10:11:03 AM »
hi

Open search.php and go to line 311

Change from:

<div>
<span class="name"><?php echo $c['s_name']; ?></span>
<?php echo ($c['i_num_items'] > 0 ? '<em>' . $c['i_num_items'] . '</em>' : ''); ?>
</div> 


To:

<div>
<?php if($search_cat_id != 0) { ?>
<img id="cattumbs" src="<?php echo eps_get_cat_image($c['pk_i_id']); ?>" alt="<?php echo osc_esc_html($c['s_name']); ?>" />
<?php } ?>
<span class="name"><?php echo $c['s_name']; ?></span>
<?php echo ($c['i_num_items'] > 0 ? '<em>' . $c['i_num_items'] . '</em>' : ''); ?>
</div>


And add to your custom css:

#cattumbs {
    max-width: 14px;
    margin: 0 5px 0 0;
}
#search-category-box a.child.active span::before {
    content: '> ';
    font-weight: bold;
    font-size: larger;
}
#search-category-box a.child.active span {
    background: rgb(59 73 223 / 10%);
    text-decoration: unset;
    padding: 2px 8px 2px 2px;
    border-radius: 5px;
}




If you like a better looking category box add this to your custom css

#search-category-box {
    position: relative;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 16px;
    margin: 0 0 16px 0;
}


Thx for the coffee ;)

 ;D


Lui-G

Thanks and done