Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #579543

    Hello, i have to insert some special java scripts (Its a special click check tool for hotels) in the body of some sites and forms?

    #579587

    Hi,

    Try adding this at the very end of your theme / child theme functions.php file:

    function add_custom_script(){
    ?>
    <script>
    
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Regards,
    Josue

    #579623

    thank you, and how can i put the scripts in any single sites or forms?

    #579686

    Hi!

    You can target page ID as following

    function add_custom_script(){
    if(is_page(59)) {
    ?>
    <script>
    
    </script>
    <?php
    }
    }
    add_action('wp_footer', 'add_custom_script');

    If that is not what you meant, please elaborate

    Regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.