0

I am launching Christmas pages across 8 different websites which share almost the same code. What is the best way to distribute this?

The files include:

  • christmas page
  • style.css
  • swipbox.js

At the moment, if I make a change in one of the files, i'd need to make it in all of them.

Would you advise creating a plugin for this?... suggestions?

jake
  • 217
  • 1
  • 4

1 Answers1

1

You can bundle the files into a plugin.

For the Christmas page, you could use the page_template filter - This question gives you an example on how to use it - Create custom page templates with plugins?

For the CSS/JS file, you can add them using the wp_enqueue_scripts action, as you would normally use in a theme. The only difference is that you'll need to use plugin_dir_url() to link to the target files.

Finally, for updating the plugins easily, there are a bunch of libraries like this one which allows you to have the one click updates for your plugins like you normally have for plugins hosted in the WordPress repositories.

RRikesh
  • 5,655
  • 4
  • 32
  • 45