Appendix

Adding JavaScript code to WordPress websites

WordPresss is designed to separate code from content, so you will need to ask your website developer to add the JavaScript for the directory to the files of your website.

However, if you have some knowledge of how WordPress works, you could install a plugin to enable the scripts, as described in this article:

https://wordpress.com/go/website-building/how-to-properly-add-javascript-to-wordpress-3-top-methods/

 

Using an iframe instead of JavaScript

Alternatively, you might like to insert the directory using an iframe, which you can enter into a page in WordPress.

To access the code - Click on the Gear Icon, top right of the screen > Under the Settings heading select Web Directory >On the Preview Directory tab >  find your unique api from the code in the blue box containing the javascript- it is a long string of letters and numbers inside quotes next to getMMDirectory.

You can then use the following html code, replacing your-key with the your unique api key.

<iframe src="https://www.magmanager.co.uk/service/webdirectory?apikey=your-key" width = 100% height = 800px allowfullscreen="" frameborder="0"></iframe>

If you want to add a filter for your publications, add:
your-key&publications=true

If you want to add a filter for your publications with badges rather than a dropdown menu, add:
your-key&publications=true&badges=true

By default, your advertisers will be arranged by section. To arrange advertisers by Category instead, add: your-key&type=2

To arrange advertisers by Section/Category, add:
your-key&type=3

If you want to organise by Category and use the publications filter, add:
your-key&type=2&publications=true&badges=true