Install on WordPress

Introduction #

To display SpiffyLinks widgets on your WordPress website, you must whitelist your website and add a JavaScript snippet to your website’s header.

Whitelist your website #

Before adding the JavaScript embed code to your site, you must whitelist your website so that it is permitted to display your widgets. Navigate to the SpiffyLinks dashboard and head over to Settings -> Organization -> Website Whitelist. Add your website’s domain name to your whitelist.

Add the JavaScript snippet #

This is the JavaScript snippet that must be added to the <head> section of your website:
<script async src="https://cdn.spiffylinks.com/widgets.js"></script>
If you have added a Google Analytics tracking code to your website before, this should be a similar process. There is more than one method to add this code. The correct method for you will depend on your personal preferences and level of experience.

Plugin Method (Easy) #

This method uses a plugin that allows you to easily add code to your website’s header. You might already have a plugin installed that has this functionality.
  1. Install and activate a plugin that allows you to add code to your website’s header. The most popular plugin for this is WPCode.
  2. After activating WPCode, you will see a Code Snippets option in the left sidebar of your WordPress Admin. Hover over Code Snippets and select Header & Footer from the list of options.
  1. Paste the JavaScript embed code into the Header section and save changes.

Manual Method (Developer) #

This method involves creating a child theme and modifying the header.php file in that child theme. This method is intended for developers only.
  1. If you do not already have one, create a child theme by following this guide in the WordPress Developer Resources.
  2. Add the code below to the functions.php file of your child theme.
/* SpiffyLinks widget embed code */
add_action('wp_head', 'spiffy_widgets');
function spiffy_widgets(){
	?>
	<script async src="https://cdn.spiffylinks.com/widgets.js"></script>
	<?php
};