I'm trying to implement a taboola ad unit in a shortcode function, but I'm getting a syntax error. Below is the function that creates the shortcode. The code is in my functions.php file.
Can someone please help me figure out 'why' I'm getting the error and help me correct it?
Thanks for the help and have a great day!
/**
* in article placement
*/
function contentMid(){
return '<div id="xxxx-xxxxxx"></div>
<script type="text/javascript">
window._taboola = window._taboola || [];
_taboola.push({
mode: 'xxxxxxx-xxxxx',
container: 'xxxxxx-xxxxxxx',
placement: 'one word word',
target_type: 'mix'
});
</script>';
}
add_shortcode('contentMid', 'contentMid');
Aucun commentaire:
Enregistrer un commentaire