[Resolved] Verification Code

Home Forums Support [Resolved] Verification Code

Home Forums Support Verification Code

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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.

    #846433
    David
    Staff
    Customer Support

    Hi 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.

    #846705
    93487u5tr938ouh4trnos8fyoh

    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.

    #846754
    David
    Staff
    Customer Support

    The 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.

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