You can the code to head or before body tag this way. Add this code at the last of functions.php
add_action( 'wp_head', function() {
?>
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date(); (function(){ var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0]; s1.async=true; s1.src="https://embed.tawk.to/5b54359ee21878736ba23110/default"; s1.charset="UTF-8"; s1.setAttribute('crossorigin','*'); s0.parentNode.insertBefore(s1,s0); })();
</script>
<?php
} );
Hope it helps
Related Posts:
- Understanding WordPress child theme custom JS loading
- How to call a PHP function from Javascript in WordPress
- Is it possible to disable a function of a parent theme?
- How to override an unpluggable parent theme function?
- WordPress Infinite Scroll without using any plugin
- How to preserve PHP modifications while upgrading WordPress?
- How do I remove a require_once admin panel from the parent theme from the child theme functions.php?
- Calling a method from functions.php on a click of a button
- How to use WordPress (PHP) functions in AngularJS partials files?
- Copyright info change in Theme Child PHP
- Add footer.php to WordPress child theme
- Setting up the child theme so as to enable right-to-left WordPress?
- Enqueue less file not working in child theme?
- How to override a non pluggable and non hookable function in a WordPress parent theme?
- Execute only on a certain page
- Overriding a theme redux file in child theme
- Click loads template via ajax
- javaScript in section of WP API
- How to speed up admin-ajax.php in wordpress
- How do I fetch all comments per post via WP REST API?
- Deregistering a script in WordPress seems impossible
- Slide in Panel WordPress Post
- How do I display a user’s previous orders as a select box option on a product?
- Trigger popup in a php if/else statement
- WordPress child theme fails to override parent navigation menu in /inc/structure/header.php
- Use menu link or onClick to set a variable
- How to style options page in dashboard?
- Populate dropdown with Child Pages based on Parent Page chosen
- remove wp floating submenu in wp dashboard
- How to complete two other input fields, completed the first
- How to inject variables into public-facing JS using wp_enqueue_script
- JS file work only in index page
- dynamic dependent select dropdown
- Ajax load more button for comments wordpress
- WordPress Scripts Being Loaded in Footer
- jQuery code not working when included in functions.php
- Noscript not working as it should in wordpress site
- Copyright info change – Corporate Plus Theme PHP [closed]
- Is the wp_enqueue method efficient?
- Tell WP register script to load a script only when the entire page is loaded
- linking stylesheets and scripts with functions.php
- How to: Conditionally Enqueue JS and Stylesheets, for Custom Post Type (Single and Archive Templates)
- How to use wordpress function wp_enqueue_script() in php?
- How do I check or test a WordPress Auto Year Change Script?
- How to have different site identity logos on each page on Astra Theme [closed]
- Enqueing External JS on the remote server JS
- Why i can’t get custom fields value or post ID via Ajax?
- How to reference PHP in Javascript
- url_to_postid returns 0
- Removing “Powered by” footer using child theme PHP [closed]
- Overide Variable in Child Theme
- child parent styles enqueue order
- How to style injected code in header section?
- Child Theme’s Read More Text
- ‘Bones’ theme: Load stock scripts in footer instead of header?
- Enqueueing a code block from an options framework
- Need advice on theme customizer and child themes
- Time Delay a URL Redirect for Specific Page
- WordPress User Meta value variable into Google Gauge Chart
- Cannot find the php_ini configuration file to find my error log to see why my code is not working
- Adding HTML Code to Replace Text in PHP
- Gutenberg block don’t save rich text content
- Proper way to remove html code on child theme
- remove_action from parent theme using child theme functions.php
- Using Google Analytics in an enqueued JS file
- File from parent theme imported to child theme doesn’t work – any ideas?
- How to change this ajax function to submit to the default wordpress content area instead of the custom field ‘seller notes’?
- Child theme overirde template-tags in a theme built on underscores in inc/template-tags
- Trying to add some custom text into WordPress Post title via function.php
- PHP “warning include_once(): Failed to open stream” Simple HTML DOM in WordPress Child Theme
- Update $wpdb query with AJAX
- How to change order inside foreach using wp_enqueue_script?
- Using Javascript On Page – Header and Footer Now Missing
- Enqueue sripts and styles only if function is called
- Modifying child theme’s header
- Adding extra data to shortcode attributes and pass it to JS with wp_localize_script
- How do I make comment-reply-button with that takes to comment reply form on click
- custom post type column countdown
- How to call a function from functions.php with ajax?
- Custom Post type Ajax search results
- WordPress load javascript file if something… (after the page is loaded)
- Automatically refresh page if widget is added to page?
- wordpress all post filter by year
- Find the method which AJAX GET calls
- Display text of price (minus 20%) on every product page in a sentence.
- Where to find the html for WordPress site? [closed]
- Removing get_template_part in child theme
- Help with my first Metabox helper class
- Adding Gravity Form With if(is_page) Is Not Working
- Trouble figuring out how to get my button to submit comment
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- How to hide .js files on wordpress website using php or wp plugins or any? [closed]
- Warning: filemtime(): stat failed for wp_
- Show Login Errors In WordPress/Elementor (Code “works”, but breaks site)
- How can I use AJAX in child theme template?
- hiddenQuestions.find is not a function
- Customize default settings on new sites on multisite
- Hooking new functions to actions + passing parameters
- How do I get the value of a current user’s custom field?
- Allow Comments by Default for Multiple Post Types