Add a script to OJS sidebar and footer

Hello, I want to add some scripts to OJS but I can’t find the files to edit. Could you help me?
In particular, I want to add the Facebook widget for groups (it is required to add a javascript code) in the sidebar and another generic script in the footer so as to be visible from every page visited. What is the best way to proceed? Thanks to those who want to help me.

The best way to do this would be with an OJS plugin, probably something as simple as a block plugin. (You can probably inject the generic script directly into the block, as opposed to putting it in the footer.)

If you are committed to separating the code across the sidebar and footer, the Plum Analytics plugin already does something very much like this. You might be able to easily copy it to create a similar plugin for your needs.

If cloning and modifying an existing plugin is a bit much, we can point you at the template files needed to make this a local modification, but the plugin architecture gives you far better flexibility, maintainability, and the opportunity to share your work with others.

Hi @pfnc,

If you’re using OJS 3.x, check out the custom header plugin:

Alec Smecher
Public Knowledge Project Team


Hi @asmecher, that’s exactly what I was looking for. Thank you.