Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1221132
    Nilesh L
    Participant

    I added this to my child function.php but the script seems to work only on the home page. I would like to get it to work on every page. What do I need?

    
    // Add hubspot messages script to the footer
    // ================================================================
    
    function add_hubspot_messages_script(){ ?>
      
    <!-- Start of Messages Async Embed -->
      <script type="text/javascript">
        (function(d, s, id) {
          if (d.getElementById(id)){ return; }
          var js = d.createElement(s); js.src = 'https://api.usemessages.com/messages/v1/embed/234234.js'; js.id = id;
          e = d.getElementsByTagName(s)[0]; e.parentNode.insertBefore(js, e);
          })(document, 'script', 'messages-234234')
       </script>
    <!-- End of Messages Async Embed -->
    
    <?php }
    
    add_action('wp_footer', 'add_hubspot_messages_script');
    
    // ================================================================
    #1221206
    Nabeel A
    Moderator

    Hi there,

    Thanks for writing in! Your code should work on all pages, please provide us the URL of your site so we can take a look.

    Thanks!

    #1221236
    Nilesh L
    Participant

    I ssee the widget here https://be.a.cloudgeni.us but not here https://be.a.cloudgeni.us/join/

    #1221717
    Nico
    Moderator

    Hi There,

    I could see the scripts in both pages however not sure which are the widgets used. Would you mind sharing us your admin credentials so we could check your setup closer.

    Don’t forget to set it as private reply.

    Thanks.

    #1221843
    Nilesh L
    Participant

    resolved. thanks for your help.

    #1221957
    Friech
    Moderator

    You’re welcome, glad we could help.

    Cheers!

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