Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #900286
    ErnestasSysojevas
    Participant

    Dear X Theme,

    we are going to use a Monitoring Software tool which requires code integration on each page of the website just before closing </body> HTML tag.
    As I am not familiar with coding, could you please help me and explain what would be the safiest and quickest way to do that?
    Most of our pages are product pages from Woocommerce.

    Thank you in advance!

    #901509
    Christopher
    Moderator

    Hi there,

    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 review how we recommend making template changes in Customization Best Practices.

    Please add following code in child theme’s functions.php file :

    function my_custom_footer_output() {
      ?>
        ...code here...
      <?php
    }
    
    add_action( 'wp_footer', 'my_custom_footer_output', 99999 );

    Hope it helps.

    #901592
    ErnestasSysojevas
    Participant
    This reply has been marked as private.
    #902481
    Rupok
    Member

    Hi there,

    Thanks for updating. We never recommend to edit original theme files in any circumstances. If you want a easy solution then I’d suggest you to use this plugin – https://wordpress.org/plugins/header-and-footer-scripts/

    It will help you to add script to header or footer easily.

    Hope this helps.

    Cheers!

    #903655
    ErnestasSysojevas
    Participant

    Thank you, I’ve done this using the plugin 🙂

    #904595
    Jade
    Moderator

    You’re welcome. Glad to hear you got it sorted. 🙂

  • <script> jQuery(function($){ $("#no-reply-900286 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>