How to add custom scripts to OptimizePress pages

If you need to add external scripts to your OptimizePress 3.0 pages (pages created in our Lightning/OptimizeBuilder platform), there are a few options:

To add codes on a specific page

If you need to add codes on a specific page, you can go to Settings > Page Scripts within the editor and paste your codes here.  This is the best place for external javascript codes - you can choose to add your code in one of 3 pages:

1. Header Script - codes will be addd in the <head></head> section of the page

2. Body Script - these codes will be added within the <body> </body> tags on your page

3. Footer Script - these codes will be added at the end of your page before the close of the <body> tags 

To add codes sitewide

If you need to add codes to pages throughout your site, you can use a plugin like "Insert Headers and Footers" - or a similar plugin available from the WordPress repository.  To add this plugin, Go to Plugins > Add New on your WordPress site and search "Insert Headers and Footers" 

This is the plugin we use:

To ensure this plugin can add codes to your OptimizePress pages, go to OptimizePress > Settings > Styles And Scripts and enable the Insert Headers and Footers plugin (or the plugin you have chosen to use) to allow it to render codes to your front end pages created with OptimizePress.

You will also need to add any codes you wish to use on all pages into the options screens for that plugin.  

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.