-
AuthorPosts
-
June 9, 2015 at 1:11 am #296541
Hello guys I’m trying to implement some Taboola code so that related posts appear below the post. I tried their plug in but nuthing is showing up. Can you help me?
June 9, 2015 at 1:12 am #296542This reply has been marked as private.June 9, 2015 at 1:12 am #296543This reply has been marked as private.June 9, 2015 at 11:25 am #297039Hi There,
Thanks for writing in.
Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please add following PHP code below into functions.php locates in child theme’s folder:add_action( 'x_after_view_icon_content', 'x_print_script_1' ); add_action( 'wp_head', 'x_print_script_2'); add_action( 'wp_footer', 'x_print_script_3'); function x_print_script_1(){ ?> <div id="taboola-below-article-thumbnails"></div> <script type="text/javascript"> window._taboola = window._taboola || []; _taboola.push({ mode: 'thumbnails-a', container: 'taboola-below-article-thumbnails', placement: 'Below Article Thumbnails', target_type: 'mix' }); </script> <?php } function x_print_script_2(){ ?> <script type="text/javascript"> window._taboola = window._taboola || []; _taboola.push({article:'auto'}); !function (e, f, u) { e.async = 1; e.src = u; f.parentNode.insertBefore(e, f); }(document.createElement('script'), document.getElementsByTagName('script')[0], 'http://cdn.taboola.com/libtrc/pasionaguila/loader.js'); </script> <?php } function x_print_script_3(){ ?> <script type="text/javascript"> window._taboola = window._taboola || []; _taboola.push({flush: true}); </script> <?php }
Hope it helps.
-
AuthorPosts