Dynamite

How to add custom code to a WordPress site

WordPress has no built-in box for head scripts. On a self-hosted site you either use a header and footer plugin or hook into wp_head from code. WordPress.com works the same way through a plugin, once the site is on a plan that permits script tags.

Before you start

Steps

Check it worked

What goes wrong

Increase conversions on your WordPress site by 20%

Dynamite personalizes the page for every visitor. Dynamite personalizes a WordPress site from one script tag in the head, added through either route above. It runs in the visitor’s browser, so check that any optimisation plugin leaves the tag alone.

Dynamite for WordPress

Questions

Can I add a script tag on a free WordPress.com site?

No. WordPress.com says free sites cannot use script tags. You need a plan that allows plugins, with hosting features activated.

Do I need a plugin on self-hosted WordPress?

No. A few lines hooked to wp_head do the same job. A header plugin is the route that needs no PHP.

How do I remove the script?

Clear it from the Header box and click Save Changes, or delete the wp_head code you added.