-
AuthorPosts
-
September 26, 2024 at 2:35 am #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?
September 26, 2024 at 6:16 am #1467846Hey 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,
IsmaelSeptember 26, 2024 at 11:05 am #1467868Hi Ismael. I’m using the Masonry for my portfolio. Page URL in private field.
September 26, 2024 at 12:03 pm #1467873Hey,
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,
YigitSeptember 26, 2024 at 12:16 pm #1467874September 26, 2024 at 1:06 pm #1467877Hi,
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,
RikardSeptember 26, 2024 at 3:30 pm #1467882Topic can be closed. Thanks!
-
AuthorPosts
- The topic ‘Replace the word “ALL” in portfolio filter doesn’t work’ is closed to new replies.
