Site logo

Archived topic

Is there an easy way to add just one filter in Generatepress ?

1 reply · Started by Frans on October 19, 2021

Viewing posts 1–2 of 2

I want to add a filter to let the csv-export of Flamingo work properly:

function sln_content_export($input) {
	return preg_replace("/\r\n|\r|\n/",' ',$input); 
}
add_filter('flamingo_csv_quotation', 'sln_content_export', 999);

I added this function to functions.php of Generatepress and it works properly. In the documentation, Generatepress states that this is not the correct way: a codesnippets plugin or child theme would be better.

Is this true ? Or is there an easier way to add just my filter to Generatepress (e.g. a Hook)?

Thanks !

Frans

This archived topic is closed to new replies.