- This topic has 3 replies, 2 voices, and was last updated 4 years ago by
David.
-
AuthorPosts
-
March 22, 2019 at 2:11 am #846310
93487u5tr938ouh4trnos8fyoh
Hi,
Code like custom JS, CSS, Search Console verification, other domain meta name verification, Google Analytics, Clicky, Facebook code and other all require installing Code Snippets. Is there a way you could incorporate that in the options for the theme or the Elements for people which are non-coders. I like to copy/past text, I don’t get how to insert a code with Elements in the footer for example and how to define that code.
I do understand that the theme is a bit geeky, but this is not very consumer friendly. I don’t want to end up installing tons of plugins to verify all these entities.
March 22, 2019 at 5:42 am #846433David
StaffCustomer SupportHi there,
CSS should be added to a Child Themes Style Sheet or the Additional CSS in Customizer. Additional plugins such as Simple CSS are just a preference.
Verfication codes or meta data / links such as Google Analytics etc can be added to the
WP_head
hook using the Hook Element:https://docs.generatepress.com/article/hooks-element-overview/
The same applies to Javascript. depending on its function may need to he added to the
WP_foot
hook. And they are declared like so:<script type="text/javascript"> Scripts in here </script>
We only recommend the Code Snippets plugin for adding PHP if the user doesn’t have a Child Theme installed.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 22, 2019 at 8:49 am #84670593487u5tr938ouh4trnos8fyoh
Yeah, but that reminds me of DIY Thesis, why not just add that as an option, instead of having us to add “<script type=”text/javascript”>” and this like that, not everyone is a coder. Thanks anyway.
March 22, 2019 at 9:48 am #846754David
StaffCustomer SupportThe common used code snippets such as Google Analytics are generally supplied by the provider in the necessary <tags>. We try to ensure the theme features remain flexible and lightweight and adding additional parsing to the Hooks to detect what code has been added would be complicated and more prone to error. Its just the way code happens to be. If you need any assistance we’re more than happy to help and point you in the right direction.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.