Jump to content
thirty bees forum

Where to add html before end of head & body tags for individual pages?


alwayspaws

Recommended Posts

Where do I add my dynamic Trust Seal on specific pages, for example to about us and contact, etc pages? Do I put it in the CMS "page content"?

I really wanted it on every page but if it will slow down my site, I'll just put it on a few pages.

I have the code and it has to go before the ends of the and tags.

Please use layman terms and not nerd-speak! lol

Thanks! Steph

Link to comment
Share on other sites

  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

If you want to add stuff in the HEAD setion of your page, you have to do it in the hookDisplayHeader function of your controller. This is also where you would load custom css and Javascript files.

You can load a tpl from there and add your code in it.

For example, in the socialsharing module, look in the socialsharing_header.tpl of the module in your theme.

Oh and of course, you will have to register your module for this hook if it's not already done.

Link to comment
Share on other sites

@alwayspaws wasn't that enough layman for you ? :) I think for the CMS pages when you write them in the back end there is button which shows you the HTML code. Just put the code wherever you need to show the seal. For other pages like product pages for example I believe you should find the matching tpl file and put the code in the body section of that file, again where you need it. I may be wrong so don't count 100% on what I'm telling :)

Link to comment
Share on other sites

If you want to get 'hacky' then you can edit the header.tpl file and put it in there for your theme. TBH I do that for my Google Tag Manager code on PrestaShop.

I've edited my comment as there is a custom code section in the Preferences area, this isn't on PrestaShop so it's new to TB. This is where you can try putting in your Trust Seal for the header.

Link to comment
Share on other sites

@alwayspaws This might be a question for Jonny :)

Does Transformer have the options for custom css, javascript, tracking and head code? Panda does, I've added code to css without problem but just to change the text color.

Might not be what you are looking for since I believe it will change all pages.

check: theme editor>custom codes

Link to comment
Share on other sites

@vzex said in Where to add html before end of head & body tags for individual pages?:

@alwayspaws This might be a question for Jonny :)

Does Transformer have the options for custom css, javascript, tracking and head code? Panda does, I've added code to css without problem but just to change the text color.

Might not be what you are looking for since I believe it will change all pages.

check: theme editor>custom codes

I've already added custom code to the transformer theme courtesy of help from Jonny, so I'm going to ask him again.

I really want it on all pages.

Link to comment
Share on other sites

If you want it on all your pages, just go to /themes/yourtheme/header.tpl, edit that file and paste the code you've got at the proper place.

This is the general header file, you'll be able to paste it just fine between the head and body tag.

Or did I miss something ?

Link to comment
Share on other sites

Add this before your tag

and

Add this before your tag

end of code

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...