*

Yogesh

  • ***
  • 27 posts
latest listing- hide some category
« on: May 28, 2016, 12:50:11 PM »
hello frosticek,

I want to hide some categories at the front page latesting listing...

i have applied a solution also (can't actually remember where i found that)....... but i am facing a problem there that if i selected to show 30 latest listings in front page and there are 22 listings from the categories i have hidden from front page then it will show only 8 latest listings in front page...
thanx...

*

MB Themes

Re: latest listing- hide some category
« Reply #1 on: May 28, 2016, 06:11:21 PM »
@Yogesh
Theme provides only option to choose 1 main category from which listings will be picked or choose all categories.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Yogesh

  • ***
  • 27 posts
Re: latest listing- hide some category
« Reply #2 on: May 28, 2016, 06:51:22 PM »
but when i choose any category...it didn't show any listing there

*

MB Themes

Re: latest listing- hide some category
« Reply #3 on: May 28, 2016, 08:41:51 PM »
@Yogesh
Yes I see there is issue in code, it is not looking in subcategories of choosen category.

Go to file:
oc-content/themes/zara/function.php

Find line:
Code: [Select]
$listCategories = $category;
Replace with:
Code: [Select]
    $subcat_list = Category::newInstance()->findSubcategories( $category );
    $subcat_id = array();
    $subcat_id[] = $category;

    foreach( $subcat_list as $s) {
      $subcat_id[] = $s['pk_i_id'];
    }

    $listCategories = implode(', ', $subcat_id);
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots