[Resolved] Adding code to top of all pages & thank you page in WordPress/WooCommerce

Home Forums Support [Resolved] Adding code to top of all pages & thank you page in WordPress/WooCommerce

Home Forums Support Adding code to top of all pages & thank you page in WordPress/WooCommerce

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #749195
    Jo

    I have a request from my client to add code to each page of a website and also the thank you page in WooCommerce. I googled it and they pretty much said I need to add to a child theme so I don’t lose it when the theme is updated. The theme of course is Generate Press. Do you know of anyway to add code between the body tags on the theme without using a child theme? Is there a hook for that? Sorry this is new to me. I used to do it in Dreamweaver which was a fairly simple process. If I do need to get a child theme do you have a suggestion for one that will work well with Generate Press? Below is a link to the page where I will develop the code for this program. The website is still not live to the world yet but here is the IP address I’m using to develop it: http://69.39.226.3/. If you need credentials for the site email me and I can give those to you.

    Program Link:

    Thanks for reaching out. Please follow the link below for documentation on ShareASale’s tracking solution for the Apple ITP 2.0 rollout.

    https://urldefense.proofpoint.com/v2/url?u=http-3A__shareasale.com_itp_custom.htm&d=DwIDaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=uzFHampMo66PXVOUlU2lopTuDD9m4QJN5EurqOULJu9RveBGwQrZWtvvCsM-L3e4&m=DopibcVFWDLrScctlfyPTy9CAaZX-LjyvB0js7iyGuo&s=x9Qzv6hW7zmTE-_6LGneJvAx-ugwTql9NPg2bXwg4yY&e=

    Thanks, jo

    #749197
    Leo
    Staff
    Customer Support

    Hi there,

    I think what you are looking for is the wp_head hook.

    It’s included in our Hooks Elements.
    https://docs.generatepress.com/article/hooks-element-overview/

    Let me know if this helps 🙂

    #749241
    Jo

    Thanks Leo, I will let you know if I have any trouble. There is also an area on the thank you page of WooCommerce I need to put code. Would that involve the Generate Press theme at all or is that more of a WooCommerce question?

    #749244
    Leo
    Staff
    Customer Support

    In wp_head?

    If so you will need to find the right conditional tag for that page.

    #749245
    Jo

    Thanks Leo

    #749277
    Leo
    Staff
    Customer Support

    No problem 🙂

    #755888
    Jo

    Hi Leo, I had another bit of Code I need to paste for Google Shopping. They sent the below message with code to my client. I am thinking I need to put it into WP_head but could you verify that. I’m just wondering because they say on the home page head. Does it matter that this will probably be on every page then?

    “Copy the meta tag below and paste it into your site’s home page. It should go in the <head> section, before the first body section.”

    <meta name=“google-site-verification” content=“eb_-WyN9riV7Vr-BppfpJS3w3V-Bm8bRRYYiUtKArTE” />

    Thanks, jo

    #756010
    Leo
    Staff
    Customer Support

    wp_head is the right one.

    #756019
    Jo

    Great, thanks!

    #756020
    Leo
    Staff
    Customer Support

    No problem 🙂

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