[Support request] Is there an easy way to add just one filter in Generatepress ?

Home Forums Support [Support request] Is there an easy way to add just one filter in Generatepress ?

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

  • This topic has 1 reply, 2 voices, and was last updated 3 months ago by Leo.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1968926
    Frans

    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

    #1968966
    Leo
    Staff
    Customer Support

    Hi there,

    The documentation is correct. You will need to use one of these methods:
    Adding PHP: https://docs.generatepress.com/article/adding-php/

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