Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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

    #569149

    Hi 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,
    Rikard

    #576370

    Hi Rikard,

    Apologies for only getting back to you now. Please see temporary login details in the Private Content area.

    Kind Regards,

    Joline

    #577597

    Hey!

    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!
    Ismael

    #588851

    Hi 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

    #590611

    Hi!

    Are you sure? I modified the portfolio.php file again and it is working. Please make sure that you follow the code correctly.

    Best regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.