Wordpress Integration

To install Hovr on a wordpress hosted website

🚧

Hosting on WordPress.com

You will need a Business Plan if you are hosting your website on WordPress.com. This is the only way to be able to add the necessary javascript to your website.

Integration steps

Sites using Wordpress will need a different script compared to the script given via the admin tool. Listed below are the before and after version of the script needed to get hovr up and running. You can copy and paste the code displayed in the after section directly into your global plugin section or anywhere else you are able to add in custom snippets of code. The only thing you will need to change is the siteId value.

Before

<script id="hio-script-identifier" defer src="https://plugin.hiosocial.com/bundle.js" data-id={siteId}></script>

After

(function(d, id) {
    let hovr;
    hovr = d.createElement('script');
    hovr.id = id;
	hovr.setAttribute("data-id", {siteID});
    hovr.defer = true;
    hovr.src = 'https://plugin.hiosocial.com/bundle.js';
    d.head.appendChild(hovr);
}(document, 'hio-script-identifier'));

Why do I need a different code?

When Wordpress serves up the content it will occasionally overwrite the src value in our script which is needed to run our code. When that value gets overwritten it is impossible to download the necessary code Hovr needs to run.