Add script on every page

Posted in: Newspaper
Post count: 79

hi

one of my advertisers requires me to add some script on every page of the site – which is the easiest way of doing that?

my site is moviesgamesandtech.com

many thanks

Andrew

Post count: 22421

Hello,
On pages you can add javascript codes from visual composer by using the raw js element: http://screencast.com/t/EEd8OCAif
Thank you!

Post count: 79

thanks Bogdan

rather than having to edit each page on the site to add the script, is there a way to add it across every single page, including the front page?

thanks

Andrew

Post count: 22421

Hi Andrew,
If you want to add the script on all pages, you need to add the code in the page template files. There are 3 page templates so there are 3 files to edit form the root directory: http://screencast.com/t/GpW18vAXD
Thank you!

Post count: 79

thanks Bodgan

I assume I can just put the script anywhere in those three?

also, I read somewhere that it’s better to put the script in the header?

thanks again!

Andrew

Post count: 23312

Hello aedney,

Please keep in mind that we have no idea what type of code you have. If you want to add your js.code in your header, you will have to edit the header.php core file and place there like this -> http://screencast.com/t/jiiQ1IttD or if you want to add it to your pages, you have two possibilities -> the first one, using the ROW JS element from Visual Composer and secondly you will have to edit the page templates corresponding to your page template used by you. Please notice that we only guide you in the right direction and if you are not aware what you will have to do further, please consider hiring a freelancer/developer to help you because we cannot provide customization services at the moment, sorry!

Thanks for your understanding!

Post count: 79

thanks Catalin – that answer’s it perfectly 🙂

Andrew

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.