- This topic has 3 replies, 2 voices, and was last updated 1 year, 6 months ago by
Elvin.
-
AuthorPosts
-
December 10, 2020 at 11:30 am #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
JohnDecember 10, 2020 at 4:24 pm #1575061Elvin
StaffCustomer Support1). 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 thegp_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?"December 11, 2020 at 11:46 am #1576585John
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!
December 13, 2020 at 4:51 pm #1579152Elvin
StaffCustomer SupportThanks 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?" -
AuthorPosts
- You must be logged in to reply to this topic.