Tagged: categories, filter, Portfolio
-
AuthorPosts
-
January 20, 2016 at 12:41 pm #568566
Hi Team,
I’m using the portfolio grid to display case studies from past projects. The filter is working fine, but it does not show all the portfolio categories in the filter.
For example, page one will display 2 categories and page two will display 4 categories.
I know it’s probably only displaying categories of portfolio items displayed on the current page, however, I need all the categories to show on the first page and be able to filter these.
Hope the above makes sense.
Kind Regards,
Joline
January 21, 2016 at 5:27 am #569149Hi Joline,
Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
RikardFebruary 2, 2016 at 11:33 am #576370Hi Rikard,
Apologies for only getting back to you now. Please see temporary login details in the Private Content area.
Kind Regards,
Joline
February 4, 2016 at 6:56 am #577597Hey!
It’s possible to display all sort button but you have to modify the config-templatebuilder > avia-shortcodes > portfolio.php file. Look for this block of code around line 602:
if(in_array($category->term_id, $current_page_cats)) { //fix for cyrillic, etc. characters - isotope does not support the % char $category->category_nicename = str_replace('%', '', $category->category_nicename); $output .= "<span class='text-sep ".$category->category_nicename."_sort_sep'>/</span>"; $output .= '<a href="#" data-filter="'.$category->category_nicename.'_sort" class="'.$category->category_nicename.'_sort_button" ><span class="inner_sort_button">'; $output .= "<span>".esc_html(trim($category->cat_name))."</span>"; $output .= "<small class='av-cat-count'> ".$cat_count[$category->term_id]." </small></span>"; $output .= "</a>"; }
.. remove the conditional:
//fix for cyrillic, etc. characters - isotope does not support the % char $category->category_nicename = str_replace('%', '', $category->category_nicename); $output .= "<span class='text-sep ".$category->category_nicename."_sort_sep'>/</span>"; $output .= '<a href="#" data-filter="'.$category->category_nicename.'_sort" class="'.$category->category_nicename.'_sort_button" ><span class="inner_sort_button">'; $output .= "<span>".esc_html(trim($category->cat_name))."</span>"; $output .= "<small class='av-cat-count'> ".$cat_count[$category->term_id]." </small></span>"; $output .= "</a>";
Note that clicking on an empty category will render the grid blank.
Cheers!
IsmaelFebruary 25, 2016 at 10:32 am #588851Hi Ismael,
Thanks for this. Unfortunately the result wasn’t exactly what the client wanted. It removed all the filter categories except the “All” category. We need all the category names to display and filter when selected.
Hope you can assist. Appreciate all the help so far.
Kind Regards,
Joline
February 29, 2016 at 9:24 am #590611 -
AuthorPosts
- You must be logged in to reply to this topic.