Ajax - The core of WordPress uses Ajax only in the administration screens. For instance, Ajax is used for instant updates when you are doing comment moderation, and when you are adding and deleting items from lists such as categories, blogroll, and posts; Ajax is also the technology behind the auto-...

learn more… | top users | synonyms

0
votes
1answer
416 views

(updated) How to add AJAX error handling to a (fully) custom registration form?

Update 2.1: Okay, after messing around with this some more I remembered that I hadn't included the JS file which was causing the white screen, OOPS! ;) Now the form does not submit the data nor send ...
-1
votes
0answers
20 views

Redirect wp_dropdown_pages() to an AJax request?

I want to get the result of wp_dropdown_pages() to fire an ajax request to show an image instead of redirecting the user to the page url. In other words, my pages are all for car models. I want to ...
0
votes
0answers
15 views

WooCommerce Ajax add to cart not working on Multisite [on hold]

I've configured multisite with example.com and example.com/in When am adding a product to the cart of example.com/in, it will be added to the first blog example.com and not in example.com/in. It ...
1
vote
1answer
4k views

wp_query->max_num_pages always returns 0 on custom post type

Hi there I am developing a theme where I have to load some posts with ajax, in my index page everything works properly, the problem is when I need to use it on custom post type, I pass the values for ...
1
vote
2answers
37 views

Returning a value from a PHP page

I have created a WordPress page that has this simple PHP code: <?php $result = array( 'State' => 'Done', 'ID' => 1 ); wp_send_json( $result ); ?> When ...
3
votes
2answers
437 views

How to modify wp_ajax function?

I want to modify wp_ajax_find_posts function. It receives search string from find-posts form and delivers search results by ajax. Part of the function looks like this: function wp_ajax_find_posts() { ...
1
vote
0answers
25 views

Loading <!--nextpage--> post with Ajax

Here's the case I got: I've setup post pagination for my website and everything works well. Except one thing - on every new page request all the resources are loaded again. This makes the website ...
1
vote
1answer
23 views

ajax nonce verification failing

I have a voting system where a list of posts are printed out using an archive template. Each post's voting button has html data attributes containing the vote-id and the vote-nonce. When the voting ...
0
votes
2answers
519 views

apply_filters, EMBEDS and AJAX not a friends?

I encountered a problem... There is content that contains a YouTube link Lorem ipsum bla bla bla http://www.youtube.com/watch?v=nTDNLUzjkpg My plugin display this content with that code in the ...
1
vote
1answer
8 views

Update attachment metadata fails

Updating attachment title and description metadata with wp_ajax breaks all previous datas and structure of attachment, my php code: add_action( 'wp_ajax_update_attachment', '...
0
votes
1answer
3k views

Ajax page load without reload

I am working on a script to load my page without refreshing. It is working as I want it except for one thing. The test site I have up is http://dev.dog-company.com . Only home About us and FAQ will ...
0
votes
1answer
969 views

wp-admin/admin-ajax.php returns 404

www.mysite.com/wp-admin/admin-ajax.php returns error 404 when logged out. www.mysite.com/wp-admin/admin-ajax.php loads a blank page with 0 when LOGGED IN. This is the proper behavior as per Wordpress....
0
votes
1answer
43 views

Ajax not working to insert, query and result data

On my site, through a form I send/register same information in database, do a SELECT/query and return it! Return the last table saved in database, just that user just entered on the form (along with ...
0
votes
2answers
713 views

WP_Session not acting with AJAX

The concept is to put a Button in Post Content which the user will click. Two things - The ID of the post and Number of times the user clicks the Button should be displayed. Reason - With this we ...
0
votes
1answer
3k views

Display data on same page as form without refresh

I am not sure if there is something about wordpress, or what I am doing, but I can not get online tutorials to work when implementing in a page template. For example this http://www.computersneaker....
0
votes
0answers
20 views

Overriding product search in Woocommerce admin

I need to alter the query used for the AJAX product search when adding or editing an order in Woocommerce admin. I want to add variation terms to the query. Using browser dev tools, I see the call ...
0
votes
0answers
14 views

pure AJAX using POST method connection to page-{page name}.php failed

I know it's a bad habit but I just need to get things done quickly using AJAX. (Pure javascript). Therefore I implement all the codes on this page-{name}.php at the very beginning of the file. My ...
1
vote
1answer
499 views

Plugin: AJAX query external API to sync to tables

I'm planning to write a plugin that hooks into an external API and syncs to a couple of database tables some information. I want to do this in a best practice way if there is one. I want the user to ...
0
votes
0answers
18 views

AJAX call to Vimeo API from WP admin

What I am trying to do is query the Vimeo API to populate some ACF fields in a custom post type. I'm loading this in the admin head for WP Editor, which grabs the Vimeo URL from the ACF field, and ...
-1
votes
0answers
28 views

How do I get multiple Gravity Forms to post to the same database fields? [on hold]

I have multiple email sign-up forms on some of my pages (in the header, some in the body, another in the form of a sliding pop-up). From my understanding, I shouldn't be using the same form because it ...
0
votes
1answer
421 views

Ajax call through admin-ajax.php returns 404 error

I am trying to do a pretty basic AJAX request at the moment, just to test functionality, routing my calls through admin-ajax.php. However, every time I try to fire the AJAX request, I get a 404 error ...
0
votes
1answer
456 views

Using AJAX and PHP to load next post object

After looking through the jQuery documentation and many stackexchange community forums, I am still faced with this problem. Taking little bits from here and there have helped me get this far, but I ...
0
votes
0answers
18 views

permalink with partial ajax site

I'm trying to load a page with from a URL with an ajax call. This is what i have : a home page with the url / -> list all movies & events a page called cinema with the url /cinema -> list all ...
0
votes
2answers
6k views

Accept AJAX call with serialized form data

I'm trying to pass a wordpress plugin some form data via ajax and it works just fine, unless the form data is serialized, then the server responds with an error message. I'm stuck with this for days ...
0
votes
0answers
23 views

Create custom term using ajax

I need to create terms from a custom taxonomy on the front using Ajax, I haven't found a way to achieve this. Is is possible? This is what I have so far, for the front: <table class="table ...
13
votes
7answers
18k views

Admin Ajax is returning 0

I am relatively new to jQuery and AJAX in particular. I have a small issue with the return value always being 0, though I think this is actually the success message and it's not returning anything. I ...
0
votes
0answers
18 views

Ajax custom taxonomy and query_posts

I'm trying to add ajax load more function on my custom taxonomy template. I'm stuck, It works for me on category templates and stuff, but not on taxonomy template (archive). So, here's my loop ...
0
votes
0answers
47 views

Ajax WordPress comment for latest version

Is there and latest and updated way to make a custom WordPress comment box to post comments thought ajax or without reloading the page. I am not understanding what is wrong.. the success is triggered ...
0
votes
0answers
544 views

Pull & display new comments without refreshing the page

I've just managed to implement ajax on comment submission and now members don't have to leave the page when they comment but still have to go one extra mile when they want to see new comments. I've ...
1
vote
2answers
6k views

wp_mail script with jquery post

need to send an email from a page when a form is submitted. Thought i'd use jquery post but not really sure where to start. Would i use wp_mail? And if so how could it be called ? Sorry if that ...
0
votes
0answers
38 views

Wordpress Ajax with error

On my site, through a form I send/register same information in database, do a SELECT/query and return it! Return the last table saved in database, just that user just entered on the form (along with ...
0
votes
1answer
14 views

Automatic add space if user enters number(any digit)

I have one input field in that I need to check that if user enters any digit then it automatic add spaces i.e. When someone enter a phone number like 0499287909 then in string should change the ...
1
vote
1answer
3k views

Ajax load more posts - WP_Query parameters not working

I'm trying to replace the standard WP pagination with an Ajax load more posts button. I'm basically following the code from this question which for the most part works well. Here's the relevant code:...
1
vote
2answers
56 views

Shortcodes not resolved in AJAX call response

I have a simple function, which returns the content of a page with the given pageID: function get_page_content(){ $id = $_REQUEST['id']; $page_data = get_page($id); echo ...
1
vote
1answer
163 views

Update user meta using with ajax

I want to edit user meta on the front using an ajax form, this is what i have: The form has the user ID: <form id="<?php echo $current_user->ID; ?>"... This is the script:: <script&...
0
votes
1answer
28 views

Create Page With wp_insert_post() and AJAX

I've been trying to figure out how to create a post (or any custom post type) with wp_insert_post() and AJAX...so far to no avail. What I hope to achieve: Any user (not just logged in ones, I don'...
0
votes
0answers
13 views

Pass JS VAR back Through AJAX

I have a PHP array that contains the post IDs of categories collected using AJAX that I need to pass back to be used in jQuery; Array ( [0] => Array ( [id] => 15 ) [1] => Array ( [id] => ...
1
vote
1answer
35 views

Wordpress Integration with Google Groups

I'm having some trouble trying to make an area on my WordPress site, that must be accessible only to members of my Google Group. I tried to make it with some plugin, but most of them would take me to ...
0
votes
2answers
1k views

AJAX request not routing through proxy

I've built a plugin that uses AJAX to post a URL to the URL2PNG API and bring back a screenshot into WordPress via wp_remote_get. It works beautifully in my development environment. In production, ...
0
votes
2answers
1k views

Use AJAX in a WordPress Plugin to Get Data From Custom Database?

I've created a PHP script that works great stand alone. I need to convert this script to a WordPress plugin. I've created a custom table in the WordPress database. When i try to get data back I get ...
0
votes
1answer
809 views

Load more posts with multiple queries

I've been developing a theme which uses the load more ajax plugin, everything is setup and working great with the main query. But, once I setup a new query for popular posts, the load more posts ...
0
votes
1answer
57 views

pop-up lighbox with AJAX

I need to create ajax script where user choose a post type and after choose post type post show on a light-box or any thing but without loading. I can't get an idea. Please give me a idea to improve ...
1
vote
1answer
85 views

Load a page into a div with Ajax

I'm really a noob when it comes to Wordpress, right now I'm working on a theme that basically is all static, if you want to edit something you'll have to edit the .php file than rather doing it on the ...
2
votes
2answers
41 views

Page Reloads Before AJAX Request Finishes

I am working on a WP plugin, and I need to be able to call a URL (specifically an AJAX function) using a button click, but the page refreshes after clicking it, which I think is preventing the AJAX ...
0
votes
1answer
44 views

Convert canvas to image and upload image to server

I'm working on a wordpress site about blackout poetry for a university project, where the user can blacken parts of a text to create a poem. After the user has created his poem, we need to give him ...
0
votes
0answers
40 views

jquery Load All Wordpress Post and Pages Into Div Using AJAX

Ok So I am working on my first Wordpress them based off html5 template that I created myself. Right Now On the site I have a continous music player. It allows the users to listen to music while ...
0
votes
0answers
19 views

How do I add a button to run some code on a page when the button is clicked

I have a this conditional code below and I'd like to know how to add a button that when clicked will 'run' the code indicated. I have no experience with ajax/jquery but I assume it is what is needed? ...
0
votes
0answers
20 views

admin-ajax.php 404 not found [closed]

I'm trying to edit theme color , when i press save and publish button it shows the error as in the picture , any possible solution ?
4
votes
4answers
4k views

Empty POST data on server on AJAX request using Angular $http

I use AngularJS to build an AJAX form which is then processed on a server running Wordpress. Server-side handler is simple: function rnr_contact_callback() { $name = $_POST['firstName'] . ' ' . $...
0
votes
2answers
33 views

jQuery.post() calling function with parameter

I have been searching around the web for this but it doesn't seems there's any topic like this (or maybe I am searching in the wrong direction). Currently I have a jQuery file which will retrieve 9 ...