Site logo

[Support request] PHP file and code dissapeared after theme update

Home Forums Support [Support request] PHP file and code dissapeared after theme update

Home Forums Support PHP file and code dissapeared after theme update

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2582405
    George

    Hello, I have inserted some PHP code in the GP folder so I can use custom shortcodes on the content of my site that retrieve the date, month and year. However, this file was removed when GP was updated and my front end broke. It was suggested to me to either create a child theme and use the code there, and use some code insertion plugin. My questions:
    1. which of the 2 options is better in terms of pagespeed & SEO efficiency?
    2. Can I use a GP hook to inject the PHP into all pages? Is this option better than using the child theme and in what ways?

    #2582878
    David
    Staff
    Customer Support

    Hi there,

    1. In general there should be no noticeable performance differences between child theme or plugin.
    And neither option has any bearing on SEO.

    2. GP Hooks should only be used to add content into the template. So they cannot be used to replace the kind of codes that need to go in functions.php file

    #2583076
    George

    Thanks David. What’s your recommendation for a free PHP code insertion plugin?

    #2583089
    Leo
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.