Black Friday Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

[Resolved] more efficient – filter or customiser

Home Forums Support more efficient – filter or customiser

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #495113

    before purchasing GP premium, I set up some filters / functions for specific things

    e.g. to hide the author on the posts I put this in my child theme functions.php

    add_filter('generate_post_author', 'mc_generate_post_author');
    function mc_generate_post_author() {
    	return false;

    Now with GP premium I can go to customise / layout / blog and untick ‘Display post author’

    Which is more efficient in terms of code size / speed etc? (not just for that example but in general)

    I’m perfectly happy writing the filters and functions – I just needed the GP premium to get all the hooks I needed


    GeneratePress 2.0.2
    Lead Developer
    Lead Developer

    Hi Natalie,

    The filters are built into GPP, so you may as well use the built in filters instead of adding your own. However, the difference in code size/efficiency is practically nothing – I wouldn’t worry about it if you prefer to write your own filters.

    That being said, having your own filters might cause some confusion if you forget about them and try changing the Customizer options.

    Let me know if you have any other questions 🙂


    excellent! Thanks so much for your prompt reply

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