Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1305027

    We would like to set a custom order for the filtering categories in the porfolio grid. Right now it’s always alphabetical.

    Could you add a filter so the order can be changed?

    #1305490

    Hey appixag,

    Thank you for the inquiry.

    This is possible but you have to modify the enfold/config-templatebuilder/avia-shortcodes/portfolio/portfolio.php directly. Look for this code around line 1159.

    //get all categories that are actually listed on the page
    			$categories = get_categories( array(
    								'taxonomy'		=> $params['taxonomy'],
    								'hide_empty'	=> 0
    							) );
    

    The get_categories function accepts more arguments including a parameter to change the order of the terms or categories.

    // https://developer.wordpress.org/reference/classes/wp_term_query/__construct/

    Best regards,
    Ismael

    #1305614

    Hi Ismael
    Thanks for the response.

    Is there any way to do it without editing the theme files, e.g. in a child theme? I assume these changes would get overwritten with each Enfold update.

    I thought you could just add a new filter so we could either edit the $categories array or the argument for get_categories but I’m no WordPress expert.

    Thanks.

    #1305809

    Hi,

    You can refer to this post – https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb and apply the changes on your child theme.

    Best regards,
    Yigit

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