You could just use a RewriteRule to your .htaccess above the regular permalink rewrite rules:
RewriteRule ^ajax$ /wp-admin/admin-ajax.php [L]
Now send your AJAX requests to example.com/ajax
, and never miss core changes to that file after upgrades.
Related Posts:
- Adding admin-ajax.php to the frontend. Good or bad idea?
- How to get Ajax into a theme – without writing a plugin?
- WordPress AJAX in header.php
- Knowing blog name using blog id
- WordPress ajax insert and delete if already inserted delete the post id stored in custom table
- Theme making direct ajax calls to theme folder
- Workaround AJAX calling without directly calling WordPress backend (Admin dashboard) because it is restricted to the end user (the public)
- Opinions and recommendations on the best barebones base theme [closed]
- How to change the language for the front-end only?
- Different template of products for specific category. WooCommerce
- what the best way to include images from the template’s images folder?
- Switching themes without losing widgets?
- How to use media upload on theme option page?
- WordPress 5 / Gutenberg – theme doesn’t have featured image option showing up
- How to refresh WordPress Customizer panel upon entering a value
- Set Featured Image for Archive templates
- Multiple image logo for theme
- Hide Twenty Eleven Theme From Themes Page
- How do I change Twenty Nineteen’s primary color without using the color slider in the theme customizer?
- How to add the main style.css to my index.php?
- Remove action within a class in a parent theme from the child theme
- How to tell a theme to use different .mo and .po files?
- Can I apply a WP theme to a specific custom page template?
- How to move WordPress theme files into a subfolder without breaking the theme?
- remove rel=next on home page but not others
- Is it possible to use child theme of child them?
- Disable Sidebar in the Product Page in Storefront Theme [closed]
- Renaming the Twenty Fourteen WordPress theme
- Defining different theme for Blog posts page
- Working with an Array inside Your Theme Options Array – Multiple Values
- How to understand a specific bit of WordPress syntax
- How to unset comment_notes_before field in WordPress comment_form
- How do I tell how popular a theme is?
- How to loop over wp_get_themes() and create an array of themes name
- Force theme or disallow theme change
- How to run WordPress from other location on the same domain
- Custom options below pages/posts editor?
- Fatal error with a theme
- WordPress theme options and insert default value for serialize data
- Restrict access to specific widget field based on user role
- Twenty Twelve theme search returns Nothing Found
- WooThemes PremiumNews Theme jQuery Conflict with WordPress 3.2
- Finding and disabling ‘rogue’ stylesheet from header: Source Sans Pro
- The Cost of Installing Custom Themes
- Can I create a child theme from a premium theme without losing my posts and page etc that I already have?
- Change copyright text on the footer section [closed]
- WordPress suddenly creating theme errors
- Re-skinning Site
- How to reset a custom theme
- Warning : Invalid argument supplied for foreach() in theme php on line 56 [closed]
- Cannot changing login button color, have tried theme, plugins… is it GoDaddy managed?
- Why submenu item’s background color is not changing by css?
- Cannot see theme in my search
- What login/password do I need to install a wordpress theme?
- get_pages Not accepting my query
- Date based CSS/theme
- Functions.php error – when trying to change the theme
- Make a menu item unselectable
- conditional statement if wordpress theme block is empty then hide block
- Can I use non-wordpress themes in WordPress?
- Is bloginfo(‘template_directory’) generated based on WP_SITEURL and WP_HOME in the settings?
- jQuery is not defined – some theme features do not work!
- How can I modify the CSS only for the search results page of WordPress?
- SVG icons in Twenty Nineteen
- Does anyone know where to find the area to edit this text
- Minor changes on theme per subdomain – same contents
- fixing page URL’s
- Don’t prepend WordPress base url to image paths
- How to preparing theme for new users? Export ready theme
- Issues with dynamic widget in theme customizer
- Change name of WP content > Themes folder
- Theme Dev | Convert Template to Theme
- How to Solve the WordPress Cron Job Site Slow down Problem?
- How do I get the path to the currently in use theme’s directory?
- Pagination not working in home page
- Show part of front page on another page [closed]
- Premium theme – hardcoded url?
- Any Mobile Theme Switcher – Theme not complete (Stylesheet missing)
- Route to custom file
- div having different appearances in different themes
- Satoshi WordPress Theme – Portfolio SetUp Issues
- wordpress template page Usage [duplicate]
- How to make a website like the ones in theme demos? [closed]
- how to use Easy Docs theme to write a book?
- theme 2016 – customize css – nothing happens
- Can’t upload the theme
- Divi theme including javascript
- 2 WP websites same content different themes
- Best Practice Jumbotron Image for WordPress ~ Responsive
- How to make a page extend full screen [closed]
- Should you directly edit Template Parts and Templates from themes?
- Remove ALL HTML from single page
- Remove Google Fonts from parent theme within a child theme [closed]
- Define a Custom Template Part As A Widget Area
- Changing Sidebar In 2023 Theme
- Is it possible to dynamically show different themes for different users? [duplicate]
- Why does WP theme not look like promoted? [closed]
- Remove image next to header image on WellExpo theme [closed]
- How do I get rid of the Mindblown and the book recommendations?
- Adding PHP code to single template in 2023 edition of WordPress theme