It turns out that some themes disable functions.php for the backend, in order to prevent a complete lockout. The way they do this, is by simply doing an is_admin()
check. However, since all AJAX is ran through admin-ajax.php, this returns true, and the theme functions are not loaded.
In this particular case (Genesis Framework (theme) with Dynamik website builder (child theme)) there was a setting to enable the theme functions in the backend too, though I personally think it would be much better if the theme just checked for !DOING_AJAX
in addition to is_admin()
Related Posts:
- Get URLs for AJAX Filter Checkboxes WordPress
- post value to function with Ajax and jQuery
- Filter nav menu items HTML tags and wrap inner text with span
- Possible to hook into Media Library preview File column and use a custom image?
- How can I add a class to a nav li depending on URL?
- Modify gform_other_choice_value for specific form and specific field in Gravity Forms
- PHP 7.1 | Warning: A non-numeric value encountered in
- Combine embed_oembed_html and oembed_result
- login_headertitle is deprecated since version 5.2.0
- Set “woocommerce_is_purchasable” to false for specific “$product->is_stock_status”
- How to display the_archive_title() and the_archive_description() – “weird” interaction
- Filter to wp_list_authors
- How to add custom li item to wordpress menu
- Native gallery custom html output
- Check if a value exists in database table
- processing form data with ajax
- The_content and Preg_replace in loaded Iframe [closed]
- How to edit/replace Parent functions.php function in Child Theme to add “Walker” class
- Functions Filter Question [closed]
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- Insert Content Before div#main from the functions.php File
- Add Adsense code between job listings – wp job manager plugin
- Email Exists ERROR into Ajax registration form
- Problem with images URL after filter applying
- remove_action not working, even after changing priority [duplicate]
- How to use get_posts() function in functions.php
- remove/hide wp-editor
- Are innerHTML elements visible to jQuery functions?
- Ajax resetting my global variable
- Replace header image on all other pages but home – URL issue
- Add a class to post if it has been recently updated
- contact form in template with jquery,validate and ajax
- search form leads to 404
- get content from page through AJAX
- how to add_filter to non hook function
- Changing the text of Upload/Insert on Posts and Pages Screen
- Any adverse effects of adding apply_filters to a function?
- Conditional custom menu?
- Message notification for user
- Woocommerce Variable Product Dropdown for Custom Shop Template
- how can I add filter in specfic field in my website?
- Detect Ajax call inside pre_get_posts function
- How to display an image before title text in menu items
- Adding custom social icons to the social media icon block in the Gutenberg editor?
- Customizing the wp_video_shortcode output with add_filter
- Filter works on last selection but no others
- Overwrite text in a complicated filter hook
- Populate Product Regular Price with a calculated ACF Field Value
- How to add HTML into error message
- Ajax Form Issues using Lightsail (AWS)
- Save_post – Warning: Cannot modify header information
- custom error message for empty username and password using authenticate filter not working
- Removing comment lines from all enqueued js files using a filter function
- Add #primary at the end of navlink permalinks on single posts
- How Do I Unhook This Parent Theme Function?
- price of product can’t return when get data of product in functions.php
- remove_filter function to unhook twentysixteen parent theme function
- WP AJAX Request Not Working
- Allow user only create specific tags
- only update titles of single posts
- OOP Switch statement with array as parameter
- Ajax in plugin fails – but only on one blog – no idea why
- Child theme remove parent filter in functions
- How can I automatically delete comments that contain a URL?
- Appending „read more” to the excerpt conditionally
- How to add class dynamically from templates
- WordPress Ajax filter: Create two loops for different output styles?
- Prevent function from triggering on current page
- Using AJAX on frontend: Synchronous XMLHttpRequest deprecation except for admin role
- Assign IDs to headings in ACF using functions.php
- How to use `foreach()` in ajax call
- function replace_text for entire page
- i can’t use wordpress functions in ajax loaded php file
- Multiple Notifications SetInterval
- Function stops working
- add product thumbnail to checkout page only and include variation name
- Redirect specific author posts to another url
- admin-ajax.php 403 forbidden only when calling from external file
- WordPress Ajaxifying not working properly
- Remove External Links from WordPress posts Using add_filter() in Theme functions.php
- ACF Filter return value
- Graphic before title – Specific Category
- Which method is more correct for removing WooCommerce Extensions menu item?
- $content is empty while using DOMDocument
- Hide disclaimer from summary excerpts
- Load scripts into an AJAX div
- Load scripts into an AJAX div
- How to create admin ajax function for my contact form
- admin-ajax.php & my wp-admin folder url showing in header
- wordpress function through ajax not being called
- Only seems to be displaying one child when there are supposed to be multiple
- Best way to add image to recent posts widget?
- same get_posts function works diffrently in tag.php and functions.php
- How to make an If Else on Excerpt Filter
- wordpress ajax is not working for dropdown selection
- Why might wptexturize have become re-enabled?
- Shortcode to eliminate and replace with
- Automatic add space if user enters number(any digit)
- previous_post_link inside of a function?
- Search and Replace Script Loader in Head Only Works in Footer