[Support request] Recovery from buggy code in an element.

Home Forums Support [Support request] Recovery from buggy code in an element.

Home Forums Support Recovery from buggy code in an element.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1574765
    John

    Good Day,

    I’m a new uses porting a membership site from Thesis to GP. So far very impressed.

    I’m used to hooking code on to change stuff using a child theme. But I was checking out elements and that seemed a cooler way to do it.

    Two questions:

    1). What happens if the code I enter into elements throws a fatal error (I suck a bit as a coder)? How do I recover? Same as the code snipits plugin, or is the a better way in elements?
    2). Is there any performance hit for using elements instead of the functions file in a child theme? I have a bunch of stuff to hook on.

    I searched around the forum but did not find the answer to either.

    Thanks
    John

    #1575061
    Elvin
    Staff
    Customer Support

    1). What happens if the code I enter into elements throws a fatal error (I suck a bit as a coder)? How do I recover? Same as the code snipits plugin, or is the a better way in elements?

    Yes that’s right. You’ll have to go to your database’s wp_posts table and look for the gp_element post type that caused the issue and delete/modify it.

    2). Is there any performance hit for using elements instead of the functions file in a child theme? I have a bunch of stuff to hook on.

    Hook Elements main use is for hooking your markup and you want display rule conditions for it.

    For other hooks and filters, if its going to be a lot, then you may as well create a child theme for templates or functions.php for these things.

    But to directly answer the question, if you mean Google PSI or GTMetrix result, then it depends on what you’re hooking in. Things that load large images or scripts that calls for external resources will surely affect the performance (example: ads, video embeds, images, etc ).

    A wise man once said:
    "Have you cleared your cache?"

    #1576585
    John

    Hi Elvin,

    Thanks for that, very informative. I will stick with a child theme. Feeling around in the data base every time my code threw a fatal error could become a full time job given my coding skills!

    #1579152
    Elvin
    Staff
    Customer Support

    Thanks for that, very informative. I will stick with a child theme. Feeling around in the data base every time my code threw a fatal error could become a full time job given my coding skills!

    No problem. 🙂

    A wise man once said:
    "Have you cleared your cache?"

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