Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1209731
    bulli79
    Participant

    hello

    i have done a search but i couldnt find answer to my questions.

    im trying to insert script tags for a booking widget provided by my salon software company.

    where shall i install so widget shows up on all pages

    Thank you

    ozzie

    #1209804
    Jade
    Moderator

    Hi Ozzie,

    Please install and activate the child theme then login through FTP and add this in the functions.php file:

    add_action('wp_head','custom_script');
    function custom_script() {
    ?>
        <!-- Add the JS code in this area -->
    <?php
    }

    Hope it helps πŸ™‚

    #1210147
    bulli79
    Participant

    ok this still doesnt seem to be working this is what the functions.php looks like now.

    <?php
    
    // =============================================================================
    // FUNCTIONS.PHP
    // -----------------------------------------------------------------------------
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================
    
    // =============================================================================
    // TABLE OF CONTENTS
    // -----------------------------------------------------------------------------
    //   01. Enqueue Parent Stylesheet
    //   02. Additional Functions
    // =============================================================================
    
    // Enqueue Parent Stylesheet
    // =============================================================================
    
    add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );
    
    /*function my_custom_head_output() {
      ?>
        ...code here...mailchimp tracking code
      <?php
    }
    
    add_action( 'wp_head', 'my_custom_head_output', 99999 )*/
    
    // Additional Functions
    // =============================================================================
    
    add_action('wp_head','custom_script');
    function custom_script() {
    ?>
        <script type='text/javascript'>!function(b,c){b.saloniqid='6d58dde0-000f-45b8-ba8b-1d8a172249de',b.saloniqsite='https://salonappointments.saloniq.co.uk';var d,g,e='onlinebookingwidget-loader',f=c.getElementsByTagName('script')[0];c.getElementById(e)||(d=c.createElement('script'),d.id=e,d.async=!0,d.src=b.saloniqsite+'/scripts/onlinebookingwidget-loader.js',g=f?f.parentNode:c.getElementsByTagName('head')[0],g.insertBefore(d,f))}(window,document);</script>
    <?php
    }
    
    #1210148
    bulli79
    Participant

    any ideas why this wouldnt be working

    #1210165
    Thai
    Moderator

    Hi There,

    In this case, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link login to your site
    – WordPress Admin username / Password
    – FTP Account

    Don’t forget to select Set as a private reply. This ensures your information is only visible to our staff.

    Thanks.

    #1210515
    bulli79
    Participant
    This reply has been marked as private.
    #1210958
    Rupok
    Member

    Hi there,

    Thanks for writing back. I have checked your site and I can see the code has been added to your site correctly – http://prntscr.com/csdelo

    Check the source and you will find that. So if that’s correct and supposed to add within head then it should work.

    Cheers!

    #1211060
    bulli79
    Participant

    OK Thank you

    so in you opinion you theres something wrong with the widget code they are giving me.?

    #1211245
    Paul R
    Moderator

    Hi,

    We are not sure as this is a third party script.

    Kindly double check with script creator.

    Thanks

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