Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1467838

    Hi, I want to change the word ‘All’ in my Portfolio selection filter into the word ‘Alles’ (Dutch language). But it doesn’t work. I’ve tried the solution in https://kriesi.at/documentation/enfold/portfolio-grid/ Code:

    /**
     * Use the "avf_portfolio_sort_first_label" filter changes first label (All) in Portfolio Grid element
     *
     **/
     
    add_filter('avf_portfolio_sort_first_label','new_portfolio_first_label');
    function new_portfolio_first_label() {
    $first_item_name = " NEW ALL TEXT ";
    return $first_item_name;
    }

    In this code I replaced the words ‘NEW ALL TEXT’ into ‘Alles’ of course. But it doesn’t work. No change. What am I doing wrong?

    #1467846

    Hey paulw185,

    Thank you for the inquiry.

    Are you using the Portfolio Grid element? Please provide the page URL in the private field so that we can check the issue. We adjusted the filter a bit.

    /**
     * Use the "avf_portfolio_sort_first_label" filter to change the first label (All) in the Portfolio Grid element.
     *
     * @param string $first_item_name Default label for the first portfolio item.
     * @return string Modified label for the first portfolio item.
     **/
    add_filter('avf_portfolio_sort_first_label', 'new_portfolio_first_label', 10, 1);
    function new_portfolio_first_label( $first_item_name ) {
        $first_item_name = "NEW ALL TEXT";
        return $first_item_name;
    }
    

    Best regards,
    Ismael

    #1467868

    Hi Ismael. I’m using the Masonry for my portfolio. Page URL in private field.

    #1467873

    Hey,

    For the Masonry element, please use the following code instead:

    
    add_filter('avf_masonry_sort_first_label', 'new_portfolio_first_label', 10, 1);
    function new_portfolio_first_label( $first_item_name ) {
        $first_item_name = "NEW ALL TEXT";
        return $first_item_name;
    }
    

    Regards,
    Yigit

    #1467874

    @Yigit That worked beautifully! Thanks also @Ismael

    #1467877

    Hi,

    Thanks for the update. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

    #1467882

    Topic can be closed. Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Replace the word “ALL” in portfolio filter doesn’t work’ is closed to new replies.