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?
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
Hi Ismael. I’m using the Masonry for my portfolio. Page URL in private field.
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
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
Topic can be closed. Thanks!