This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

unlimit

  • ***
  • 25 posts
Subcategory font awesome icon not showing(SOLVED)
« on: February 07, 2019, 07:13:45 AM »
In search grid or list view the sub category icon not displaying.insread of subcategory icon it shows category icon in all lisnings.
demo of (https://stela.mb-themes.com) also shows the same.
How resolve that?
« Last Edit: February 08, 2019, 11:28:28 PM by unlimit »

*

MB Themes

Re: Subcategory font awesome icon not showing
« Reply #1 on: February 07, 2019, 10:35:06 AM »
@unlimit
Not quite understand to issue
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

unlimit

  • ***
  • 25 posts
Re: Subcategory font awesome icon not showing
« Reply #2 on: February 07, 2019, 04:18:30 PM »
This is what happened.

*

MB Themes

Re: Subcategory font awesome icon not showing
« Reply #3 on: February 07, 2019, 07:24:17 PM »
Yes this one is taking parent as on demo.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

unlimit

  • ***
  • 25 posts
Re: Subcategory font awesome icon not showing
« Reply #4 on: February 08, 2019, 04:28:30 AM »
In demo,
It should shows a car icon as it is belongs to car subcategory. but you see a bicycle icon because the theme chooses only category icon (which is the bicycle icon) but not the subcategory icon

*

MB Themes

Re: Subcategory font awesome icon not showing
« Reply #5 on: February 08, 2019, 08:01:08 AM »
@unlimit
It's not choosing bicycle icon, it's choosing icon of parent.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

unlimit

  • ***
  • 25 posts
Re: Subcategory font awesome icon not showing
« Reply #6 on: February 08, 2019, 03:51:54 PM »
Is there a code to show subcategory icon instead of category icon

Marked as best answer by frosticek on February 09, 2019, 09:09:20 AM
*

MB Themes

Re: Subcategory font awesome icon not showing
« Reply #7 on: February 08, 2019, 08:39:15 PM »
@unlimit
In file:
oc-content/themes/stela/loop-single.php

Find:
Code: [Select]
$cat_icon = stela_get_cat_icon( $root['pk_i_id'], true );
Replace with:
Code: [Select]
$cat_icon = stela_get_cat_icon( osc_item_category_id(), true );

.. similar in loop-premium.php
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

unlimit

  • ***
  • 25 posts
Re: Subcategory font awesome icon not showing
« Reply #8 on: February 08, 2019, 11:28:07 PM »
In loop-single-premium.php
add this code
$cat_icon = stela_get_cat_icon( osc_premium_category_id(), true );

Worked.
Thanks for the help.
« Last Edit: February 08, 2019, 11:33:03 PM by unlimit »