Add Custom JS, JS Libray on specific pages - Forum | JoomShaper
Staff replied SP Page Builder

Add Custom JS, JS Libray on specific pages

Asked by Nasir Khan 5 years ago Last activity 5 years ago

I am using page builder to create some pages. I need to add some JS, JS Libray on some specific pages. I know I can add custom JS from the template, but that will load the script for all the pages. Whereas I only need to enable the script to some specific pages only.

Can you please tell me to refer some doc to do this task?

5 replies

Paul Frankowski Senior Staff

We can consider advanced custom code addon but for SPPB 4.x - not 3.x series.

Nasir Khan Asked this

Thanks for the prompt response.

I already solved the issue by using the Raw HTML addon.

Nasir Khan Asked this

Raw HTML works on the pages. But if I use pagebuilder on the article and include the library links that page became unusable. It shows some code above the page.

How to solve this?

Paul Frankowski Senior Staff
5 years ago · edited

Raw HTML addon is only for clean & simple HTML code, if you added there different code - your fault, sorry, you have been warned 2x, by addon description and documenation.

How to fix it now:
edit Raw HTML addon in back-end editor (Admin area), remove your custom code and use tips from documenation. If you cannot edit that page any more, use PHPMyAdmin and remove code manually.

Log in to reply.