If your AJAX Url is conversion.php it will most likely point to yourdomain.com/conversion.php.
Is your file in that location?
Looks like not, and I guess you don’t have a 404.php, and in that case your request gets directed to your index.php, that’s why you get the contents of your homepage.
If your file is in your theme folder, you would have to change the URL to wp-content/themes/yourtheme/conversion.php
But the much easier and recommended way is to use WP built in AJAX functionality:
See this codex page for more informations:
http://codex.wordpress.org/Plugin_API/Action_Reference/wp_ajax_(action)
EDIT: Most posts on this topic are for AJAX on the WordPress backend but it’s possible to use it on the frontend as well.
Related Posts:
- ajaxurl not defined on front end
- Help adding image upload functionality to widget
- Admin-ajax.php appending a status code to ajax response
- Ajax in WordPress – path issue
- how to search users by ajax live search
- Ajax contact form widget plugin data not insert in database
- jquery & ajax sending data to php
- Ajax submit result opens in admin-ajax.php
- insert query on a custom table using ajax with jQuery plugin Jeditable
- Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
- Data not insert and update through ajax and jQuery in admin page?
- WP ajax requests not stacking?
- ajax working when function is on child theme but not in plugin page
- Ajax +wordpress onClick link redirect to new page and create html content
- Get cat parameter from admin-ajax
- Ajax on the Administration Side of plugin – returns 0
- Jquery php request is returning a weird result
- WordPress Ajax not returning Response
- wp_ajax add_action fuction won’t fire on custom jQuery action
- Filterable posts using categories
- How to get values from Tinymce visual editor popup?
- WordPress function is not called and ajax return 0
- Ajax call not working with
- Page reload occurs before request finishes
- Widget Dropdown doesn’t working
- Create custom HTML/JS app inside page
- How do I get the sub categories of the parent when in a sub category?
- How to limit number of number of categories displayed by categories widget
- Use just a shortcode from another page
- Input in plugin widget does not allow spaces
- Get draggable widgets on Edit Post page
- How can I inject options into an select tag inside the widget form?
- template_redirect or admin-ajax.php?
- WordPress custom taxonomy check box to dropdown
- Hide shortcodes “code” when using the “editor” the same as wordpress do with “gallery”
- Dynamically creating classes for Widget API
- Widget options are not updated
- Why does my widget break other widgets?
- jQuery does not enqueue for my purpose… (before an inline script in the footer)
- how to get context information inside my funcion
- CSS not affecting widget output
- Plugin – Make sure jquery is loaded in my settings page plus my JS file
- Using a multiple element in widget form
- jQuery in WordPress Plugin
- AJAX form post returns 0
- Problem with saving checkbox values with WordPress Widget API
- Update Data parameter of a wp_localize_script() call
- WP Plugin Running before jQuery
- wp_localize_script is not adding a global variable for javascript
- should i be checking for jquery before enqueing it in a plugin
- Can’t get AJAX call working in custom plugin
- Bad Request in AJAX
- Remove entire [$key] from array stored in custom field using Ajax – unset($array[$key]); not working
- 400 Bad Request, in wordpress theme development, wp_ajax
- jQuery instantly executes (a button click and css change) on load
- Ajax is not working in a loop
- How to include jQuery into my plugin so I can use it on plugin page?
- ajax recursive calls on wordpress returning answers outsite the function scope
- Are there any security risks when submitting data-attribute data through AJAX?
- how to get the post id in plugin
- Jquery was not found on this server
- How to enqueue scripts in right way in a plugin?
- Are there any official or unofficial guidelines for the styling of a widget?
- How to get error object returned by wp_create_user
- Plugin AJAX Save to Custom Table
- wordpress widget missing jquery
- Create Widget or Enable Shortcodes in Sidebar
- making a plugin that moves other plugins wp_head actions to wp_footer
- Minimum Widget Width for Plugin Development
- Setting a JSON web token from a secondary api as a secure cookie on WordPress
- Need help about understand api, wp, $ syntax in WordPress plugin script
- How do I get rid of my inclusion race-condition on wp_enqueue_script
- Issues Updating Post Meta with AJAX (Seems simple but cannot figure it out)
- Insert Into Post Not Working For Audio File Using jQuery
- How to create a wordpress widget that dynamically changes according to the page
- How to disable a jQuery plugin on WordPress plugin page
- jquery in wordpress plugin with depdendency
- AJAX button with success callback. (Titan Framework)
- AJAX call to admin-ajax.php by subscriber returns home page
- Using function from enqueued .js file in theme in plugin?
- jQuery UI tab does not work in the plugin page
- AJAX call returns ‘testtest0’ instead of ‘test’ – why?
- Ajax function is not working on WordPress
- How to overwrite iris color pallates from theme to plugin
- About a programming language starts with [closed]
- Best practice for plugin: always detect admin-ajax call?
- add_action wp_ajax_ not loading in plugin file WP Network
- Why is the form not updating when I select a new sector from the list?
- Workflow for new importer plugin – your advices?
- Plugin Form Submitting to admin-ajax.php instead of admin-post.php
- Use options to control jQuery plugin
- Execute Jquery when a specific page in my plugin is loading
- Thickbox in Plugin settings page?
- How to localize data array in plugin’s option page
- WordPress dynamic widget by location?
- sanitizing/escaping plugin options
- Load php file with jquery in single.php
- AJAX request not routing through proxy
- Can / should a widget plugin define its own Widget Area?
- Loading Images from Javascript on the Front End