View Full Version : Where to add code to <head> and <body> sections of a Page?
alfuzzy
05-03-2019, 09:56 PM
I have a project where I'm supposed to add some code within the <head> section of a page...and a 2nd bit of code in the <body> section of the same page.
Let's say we're talking about the Home Page of my site...where do I find the <head> and <body> sections of the home page?
Is it a specific template or templates I need to edit...or something else?
Thanks
In Omnibus
05-04-2019, 01:55 AM
The <head> section is hidden. It contains the doctype and meta charset and css rel links and such. The <body> is the entire visible document. What part of the body are you supposed to edit? vBulletin 4 is not coded in HTML5 so the <div> tags are used in places where HTML5 uses different tags like <article> and <section>.
alfuzzy
05-04-2019, 09:34 AM
Hello In Omnibus...thanks for replying.
Basically the code I need to insert in the <head> and <body> area's of a page is advertising code from a different advertising supplier I'm trying out. I kind of figured what you mentioned...that vBulletin doesn't work exactly like websites/webpages written in HTML5...but thought since I'm no expert...I should ask for clarification/help.
The instructions I was sent say:
- "Add this code in the head section"
- "Add this code in the body section"
Normally when I add advertising code for vBulletin I simply edit each "ad template" with a single section of code...and most of the time everything works fine. In this case I'm being told to add two sections of code (one in the <head> area & one in the <body> area).
Any other suggestions? Would seeing any of the code help?
Thanks
snakes1100
05-04-2019, 10:20 AM
The head & body tags are in your templates, search for the tags in the templates, they arent to hard to find.
If you dont want to redesign your header template, just use the ad manager as it already has 2 places for header ads
In Omnibus
05-04-2019, 12:47 PM
Hello In Omnibus...thanks for replying.
Basically the code I need to insert in the <head> and <body> area's of a page is advertising code from a different advertising supplier I'm trying out. I kind of figured what you mentioned...that vBulletin doesn't work exactly like websites/webpages written in HTML5...but thought since I'm no expert...I should ask for clarification/help.
The instructions I was sent say:
- "Add this code in the head section"
- "Add this code in the body section"
Normally when I add advertising code for vBulletin I simply edit each "ad template" with a single section of code...and most of the time everything works fine. In this case I'm being told to add two sections of code (one in the <head> area & one in the <body> area).
Any other suggestions? Would seeing any of the code help?
Thanks
If it were me I would add anything that is supposed to go in the <head> to the headinclude template instead. That way you are not editing the head template.
Anything that is supposed to go in the body as far as ads are concerned I would take Snakes advice and use the existing ad manager.
alfuzzy
05-04-2019, 03:13 PM
I'm pretty familiar with the Ad Manager....and I usually modify the ad templates directly (maybe it's the same process...2 ways of doing the same thing). I've had some issues using the Ad Manager on my site in the past...and find modifying the Ad templates directly pretty much just as easy...and more reliable.
My understanding is both sections of the ad code I've been given need to be inserted in the proper places for the ads to work.
- If adding the "<head> code" to the head_include template will work...then I can do that.
- If adding the "<body> code" to the Ad Manager/Ad templates area...then I can try this too.
I will give this a try...and post results.
Thanks
alfuzzy
05-06-2019, 02:44 PM
Update:
I added the "<head> code" to the headinclude template...and added the "<body> code" to the individual Ad templates...and everything seems to be working!
Thanks VERY much for the help!:)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.