[Resolved] What is the best way to insert code?

Home Forums Support [Resolved] What is the best way to insert code?

Home Forums Support What is the best way to insert code?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #239118
    Ilse Turnbull

    I’ve bought an SSL certificate for my site. I’ve got that uploaded ok. There is a small image that tells folks the site is secure. I have to upload code on every page I want the image to appear. I’d like some way that removing or changing it would be easy over lots of pages.
    These are the two spots 2 different sets of code have to appear in
    Add this before your </HEAD> tag
    Add this before your </BODY> tag

    Then the image itself has to be placed
    Is there a way to add the image so it’s universal across the site?

    If I decide to change the certificate, manually changing all this over several pages would be a real chore.

    What’s the best way to do this?

    I have a real fear for touching code – for good reason)

    #239125
    Stacey Usborne
    Staff
    Customer Support

    Hi Isle,

    You can use GP hooks for this.

    You’d want to insert the “before your </HEAD> tag” in the “wp_head” hook.

    And the “before your </BODY> tag” in the “wp_footer” hook.

    #239174
    Ilse Turnbull

    Thanks.
    I put the code in each ‘hook’ and saved the hooks. Is that it? Do I have to place them somewhere?

    #239176
    Ilse Turnbull

    That seems to have worked. It put the image in the bottom left corner, is there a way to put the image in the top right?

    #239181
    Stacey Usborne
    Staff
    Customer Support

    Can you link me to your site so I can take a peek?

    #239185
    Ilse Turnbull

    ilseturnbull.com

    #239186
    Ilse Turnbull

    Sorry

    #239187
    Ilse Turnbull

    Ugh. see this is why I don’t code anymore.

    http://www.ilseturnbull.com

    #239256
    Stacey Usborne
    Staff
    Customer Support

    I would wrap the code you inserted in the wp_footer hook with a <div> and give it a class.

    Then you would use this CSS:

    .your-class{
        position: absolute;
        top: 0;
        right: 0;
    }

    Let me know if this works.

    #239451
    Ilse Turnbull

    Thanks for all the help Stacey. I’ve decided to just leave it where it is for now. I was nervous about using hooks and just about anything else, but it’s more familiar now. I’m going through all the tuts etc on customizing my site. Might take me awhile though.

    Thank you again, I really appreciate the help

    #239644
    Stacey Usborne
    Staff
    Customer Support

    No problem 🙂 Let me know if there is anything else I can help with!

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