How to Enable MonsterLinks in the Author Description

Important: This documentation is for WordPress-powered sites only.

If you try to add a MonsterLink to the Author Description field in WordPress, you’ll find the MonsterLink does not properly trigger your campaign to display.

To enable MonsterLinks in the Author Description of your WordPress site, you’ll need to add an additional filter to enable the required link attributes.

Warning: Adding PHP Code to your site does pose some risks if the code is not added correctly. It could even potentially break your site and your access to the administrative area. While we do not provide support for these options,
we recommend the Code Snippets plugin or add the code via FTP to your site’s functions.php file.

You can add the following filter to your WordPress theme’s functions.php template file to enable the required link attributes for MonsterLinks:

//* Add data-optin-slug to the allowed tags array and hook into Init
function om_monsterlinks_allowed_tags() {
	global $allowedtags;
	$allowedtags['a'] = array('style'=>array(
	    'href' => array(),
            'class' => array(),
            'data-optin-slug' => array()
	),);
}
add_action('init', 'om_monsterlinks_allowed_tags', 10);

Once you’ve added this filter, save the file and you can proceed with adding your Monsterlinks.

Congratulations! You’ve enabled MonsterLinks in the Author Description field in WordPress!