[Support request] adding php functions

Home Forums Support [Support request] adding php functions

Home Forums Support adding php functions

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #653794
    Modern Now

    Hi!

    We have a growing collection of functions that we are not sure how to use on the site properly. We use snippets for small code blocks but when we need to have functions with custom shortcodes that we build ourselves to pass arguments into the function. We can not use snippets because it has its own shortcode. We have been stacking them in the function.php but this is of course not wise. we do not us a child theme so we are hoping there is another way. We did try to add the functions in the head to form a custom folder location on the site and it didn’t work, we may not have done this properly. Any suggestions on how to use custom PHP functions with their own shortcodes with GP without having a child theme?

    Thank you
    Geoffrey

    #653857
    Leo
    Staff
    Customer Support

    Hi there,

    Here are the 3 methods we suggest:
    https://docs.generatepress.com/article/adding-php/

    Performance wise it would be child theme > plugin > Code Snippets.

    Let me know if this helps 🙂

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