You should really learn how to use debug mode in WordPress. You should go and read this page: Debugging WordPress. The reason being is this line of code
add_action( 'wp_footer', 'print__my_inline_script' );
If you had debug enabled, you would have seen a message like this
Warning: call_user_func_array() expects parameter 1 to be a valid callback,
because your function name is
print_my_inline_script() and you are hooking
Also, you should not use capital letters in template names, never.
You can extend the pages you want to load your script/style on by just adding
|| is_page_template('template name' ) to your existing conditions. You should also have a look at conditional tags and the
- Add custom template page programmatically
- Define custom Page Template without its own .php file
- Filter the query ONLY for the search results page
- AJAX handler throws 400 (Bad request) – why?
- ajax live search for post title
- Apply jquery script to only woocommerce product pages and categories
- Replacing select2 in admin backend for all selects
- How to save Uploaded image in custom option panel?
- Custom page template how to check is_page from functions.php?
- Display a function using AJAX
- Programmatically set page template based on page ID
- How to make unique add_filter to the_content of specific page template files – so each template gets its own addition
- Adjust which tempalte a page uses with a function?
- Add external js file to footer with id
- Ajaxing function in widget class
- How to specify which Gutenberg blocks are available in the editor for a page template
- woocommerce target button with class after ajax update
- Move jQuery and Migrate to footer?
- jquery won’t load in footer
- Filtering posts by category name based on page’s slug
- WordPress doesn’t Load JQuery Now? Do I need to enqueue JQuery also?
- Woocommerce checkout field maxlength, make input number field only (postcode)
- is_account_page() change to page slug
- Replace menu links with # and add name to its li
- How to enable template page only for a post id page
- Loading CDN that requires jQuery in WordPress
- Activate small php condition at footer over page template
- Right way to update widget on dynamic new input field
- How to load jQuery in the footer – nothing works for me
- Wp_query function to search from product_title ‘OR’ product tags name
- Allow Post Author to be 0 on Update
- Trouble with adding a wp_enqueue_script on wordpress
- WP Ajax Function Always Returning undefined
- Scripts not appending to element in AJAX call – why?
- How to change the order of Jquery in the footer of my theme?
- How to search using ajax for exact phrase or words in an input field?
- how to en-queue jQuery to load before the tag
- Jquery implementation not working on page reload
- I can’t enqueue my scripts – They literally aren’t being added to my site
- Attempt to change jQuery version caused White Screen of Death
- PHP mixed with some JS code to update WordPress theme settings
- Load jquery only for certain pages in the backend
- Change CSS for logged in users
- Always the Latest google jQuery instead of default WordPress jQuery
- Add a jQuery Function
- jQuery does not work
- using jQuery on only one page
- Pass parameter to hooked function using custom page template
- different style sheet for just one page template
- Enqueuing latest version of jQuery into a child theme returns a blank screen
- echo custom fields with AJAX
- wp_enqueue_script | Help me figure out what is causing jQuery is not defined
- Where is this JQuery coming from?
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- Passing Jquery value to WordPress function
- Add loggedout class on body using a function or JS
- Are innerHTML elements visible to jQuery functions?
- Page Template Won’t Load Correct CSS File
- Why a SlideShow (made using JQuery FlexSlider) can’t work if I load it form functions.php but work if I load it from my footer.php file? [closed]
- get content from page through AJAX
- Creating multiple category drop down
- colorbox not loading in
- How to add php within jquery
- Get URLs for AJAX Filter Checkboxes WordPress
- wp_set_object_term via js btn frontend
- Hide ‘add to cart’ when certain value in dropdown is selected
- Ajax Form Issues using Lightsail (AWS)
- How to Override Page Template if URL matches query?
- Probleme shortcode with list author
- What is the earliest Hook a Script can use?
- WordPress does not load jQuery
- How Can I Create a Friendly Slug for a Dynamic Page?
- post value to function with Ajax and jQuery
- Images with overlay
- How to use `foreach()` in ajax call
- How To Display Author Popup on Entry Meta (Genesis Framework)?
- Multiple Notifications SetInterval
- How do i create a search option for pdf’s only
- WordPress Ajaxifying not working properly
- Execute jQuery with custom event listener after successfully add an item to the cart
- Pagination won’t work on custom page
- Load scripts into an AJAX div
- Edit meta fields from within template
- True parameter but jquery register in header and not in the footer with wp_register_script
- Automatic add space if user enters number(any digit)
- WordPress Jquery+scripts enqueue issue
- Moving CDN jQuery to footer does not work?
- is_page_template wont allow me to enqueue scripts
- Adding a jQuery rotator function
- jQuery HoverIntent is not a function
- Ajax call does not work for this custom code
- How do I get my nav menu to show sub pages?
- Having problems loading Jquery in functions.php
- Owl Carousel and WordPress Integration Via WP_Enqueue
- AJAX values converted to PHP Variables?
- Animated Accordion [closed]
- Logout redirect via page template without confirmation?
- iOS and ajaxComplete