I have joined a new affiliate program and I have been asked to add some code to my website. I'm sure I have carried out this job before as I believe there is a video on Wealthy Affiliate from Kyle.

The affiliate program is asking me to; "install this code just before the </body> tag of your site's template"

Can anyone help please?

Thank you for reading.

Roy



Join the Discussion
Write something…
Recent messages
Stanleycmng Premium
Quinn and Jude got some great suggestions there. You are good.
Reply
judebanks Premium
Hi Roy, another option is: In WP, go to Themes > Customize

A list appears in the left column with theme editing options.

Check to see if the list for your theme includes adding custom code or snippet options. Mine has one called Custom Code but it can be labelled something else depending on the theme. Don't use one called Additional CSS as that one is just for css styles.

If you have this custom code or add snippet option via WP Customize, you won't need a plugin or to mess with the theme code directly as you can copy/paste the code in there. ~Jude
Reply
davehayes Premium
Hadn't seen your answer but you have said the same as me but in clearer form
Reply
Quinn2 Premium
Hello Roy, Placing code into your head of the website you need to be very careful not to delete any of the code already there. You should enter the back office of your website and click on the appearances link. This will bring up a screen to where you can find your Theme Editor. Click on the Theme Editor. This will take you to another page. This is where you will find your theme header code. Depending on which theme you have you can click on Theme Header link that will take you to the head of your website. At this time you will notice all the code. Go down the code until you have passed your second <head> code At this time you will need to click a couple spaces between the <head> code and the next line of code. At this time place your code into your website and save or update. Again please do not erase any of the code that is already there thank you.
Reply
ExpatMark Premium
I learn something new every day at WA. Thanks Quinn.

A great question, a great answer, and Trish below with the research as usual.

Bookmarked!!
Reply
TheCatherine Premium
Roy you may get a warning dependent on the theme that you are changing code. A tip I do is copy the whole code before I change it so if it goes pearshaped I have a duplicate
Reply
ExpatMark Premium
Now that is an excellent idea.
Reply
Quinn2 Premium
As Mark said, "That is an excellent idea." And with another saying of Mark's "I learn something new everyday here at WA."
May you guys have a blessed day. :)
Reply
Triblu Premium
Hey Roy,

Here's what I use for this type of issue: Editing your theme's pages only works until you update your theme, which will overwrite any changes you make... unless you create a child theme.

Hope you find this helpful.
Reply
deeptreble Premium
I could be wrong, but WordPress allows you to put in custom HTML while editing it. You just add a block and it will recognize the code. As far as the template - I don't know.
Reply
Top