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 ...

learn more… | top users | synonyms

0
votes
0answers
33 views

Ajax not working in Wordpress but works fine elsewhere?

I'm using an image gallery plugin with WP theme twentyfourteen. I embedded a submit field in one of the plugin's files which executes just before the gallery is loaded and sorts the images. All the ...
0
votes
0answers
224 views

Load Next Posts With AJAX not working with custom post type

I am using this plugin to load in my next posts with AJAX. I have implemented it into my site and it is showing the load more posts button however once you click on the 'load more posts' button it ...
0
votes
1answer
96 views

Current post in AJAX call is always zero

I have a custom post type named event and a button to load more timeline. I need to arange current timeline item to the left or right depending on his current_post from WP_query object. Ex: if ...
1
vote
1answer
43 views

Disallow second login session

I am trying to find a solution for 2 months now but unfortunately I came up with no results. I have a subscription based website which streams music. What customers basically buy is a "panel" where ...
0
votes
1answer
178 views

Form isn't inserting data into database with ajax plugin

I've been working at this for weeks without success. I've figured out problem after problem with the code, but none of the corrections seem to fix my core problem. The form doesn't insert anything ...
0
votes
1answer
122 views

Using foreach inside an ajax function

This is my first attempt to create an ajax function. My script takes the selected value of a dropdown list $('#state').change(function () { var state = $('#state ...
0
votes
0answers
56 views

Like/Dislike Bar not working when updating

I'm trying to integrate Like/Dislike Bar in a Wordpress plugin . It Works Properly when total page reload/refresh . But whentime Like/Dislike Bar refresh from ajax that time its not working . This is ...
0
votes
1answer
64 views

Theme Customizer – Conditional Controls

I would like to dynamically add / remove Controls to/from the theme customizer without completely reloading the customizer page. For example when I choose option1 from a drop down I want control A to ...
0
votes
0answers
10 views

wp_editor call with ajax [duplicate]

I'm working on a wordpress plugin that manages a database. The database has a table that has the id field name and descr. I have a php file that has two buttons, one and another rule change. When ...
2
votes
4answers
96 views

Wordpress Ajax Data problem

I couldn't add selected data to a div using ajax. Here is my code: <?php function master_ajaxurl() { $myOpt = $_POST['option']; bringDetails($myOpt); } ...
0
votes
1answer
81 views

bulk update meta value with ajax

I want to update posts meta value in the wp_query to a different value on click. What I am basically doing is making a notification bubble (like stackoverflow). wp_query with the number of posts ...
-1
votes
1answer
108 views

Contact Form 7 submission does not complete [closed]

I have a Content Form 7 Version 3.8.1 form which seems to function perfectly in that the validation events all work and when submit is clicked the console shows no error, a 200 response comes back ...
0
votes
0answers
50 views

Server-side processing of AJAX login

I'm using AJAX to login users on my website to avoid the need for a page refresh when they get their username or password wrong. Everything is done over SSL. My server-side processing: function ...
0
votes
0answers
107 views

403 'GET' Error on Wordpress Jquery Autocomplete

Overview: I am trying to create a simple jquery autocomplete in a wordpress theme, on a custom template page containing a form. I wish for it to work both front-end, for logged in users, and the ...
0
votes
0answers
54 views

wp_editor in thickbox

I am updating a shortcode generator that I made before and I want to add in addition to text areas inputs etc.. a tinymce editor, so I call wp_editor in the ajax content of the thickbox, the editor ...
0
votes
0answers
119 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 ...
0
votes
0answers
65 views

How to use Shortcode Plugin with AJAX loading?

I'm using Wordpress 3.9.1 and a Theme that utilizes AJAX loading. (the site is here: http://phoenixwave.com/test/ ) I've installed a plugin to add more shortcode abilities. Problem is, once a page ...
0
votes
2answers
38 views

Can I use HTTP POSTs? Is there a better alternative?

I am use to php development in general and I am use to getting a lot done by making a POST to a php file. However I have not seen people using $_POST in WordPress. I have seen one discussion about ...
0
votes
0answers
45 views

How to get posts from network blog

So I have function that gets posts with URL(id) (ajax stuff). It works but now I would like also fetch posts from other blogs in my network. I'm baffled how can I achieve this? Do I have to know the ...
0
votes
0answers
62 views

wp_ajax_$action works always, wp_ajax_nopriv_$action never works

I used to know that when we use Ajax API we use 2 action hooks to handle the ajax, wp_ajax_$action (Logged in users) and wp_ajax_nopriv_$action (Non-logged in users), But in my case, the latter one ...
0
votes
1answer
32 views

How to perform a frontend HTTP call with AJAX when plugin save the new settings?

I use a function to "pass" the data with get_num_queries from the front to the back end (to a plugin options page). function get_queries_wpse_143544() { $dbq = get_num_queries(); ...
0
votes
0answers
69 views

Sorting Posts Based On Meta Value Using AJAX

I am trying to short posts on frontpage/archive pages using AJAX. The AJAX call seems okay but nothing displaying. Here is the JS: jQuery( document ).ready(function() { jQuery( ".sbyp" ...
0
votes
1answer
84 views

setup_postdata in “loop-handling” php file called via $.ajax

I'm calling a "loop handler" kind of php file that opens a loop with WP_Query. Inside the foreach loop I want to use the show_postdata function. I'm aware of the global $post aspect of this function. ...
0
votes
0answers
56 views

Wordpress will suddenly stop saving files uploaded by my code (ran in nopriv ajax)

I have some code that uploads a file. I've tried both wp_handle_upload as well as regular PHP code and with both, it will claim it uploaded the files (wp_handle_upload returns an array with "url" and ...
0
votes
1answer
48 views

Ajax Call in page theme not working?

Ok, i am VERY new to wordpress (2 Hours new). I am creating a page template, which works fine, but this is the issue i am having: In the template.php file, i have this code: <script ...
0
votes
1answer
86 views

Error with function in functions.php?

I am using the below function in my custom theme to load posts via AJAX. But for some reason it is breaking the WP ADMIN WIdget Drag and Drop and also showing the White Screen of Death when I uploaded ...
0
votes
1answer
115 views

Detecting post type within init action

I have an front-end ajax login on my site. I want to set the redirect url to '/services/clientarea'; for every page that is not part of the blog. For blog pages i want the login redirect to be ...
0
votes
0answers
89 views

Ajax contact form

I have a custom contact form that I am trying to process via Ajax. I am a bit newbie in Ajax and more using it on WordPress. I have built it but it doesn`t send the email and retrieve "0". Php ...
0
votes
0answers
65 views

Attaching images on frontend with AJAX to show thumbnails before submitting form

I currently have a frontend post upload form working so that users can add thumbnail attachments to a post, however it isn't possible to see which thumbnails you have attached before you submit the ...
-2
votes
1answer
202 views

Load loop images on click / defer image loading until click or other event

I have a loop of some images (custom post type) that are in a tiny slideshow. There are about 30 of them. When the user clicks the tiny slideshow, it pulls up a fancy-box gallery that is populated by ...
0
votes
2answers
107 views

wp_ajax action is not running

I'm writing a plugin. I want to run the method get_my_option when someone pressing a button in the settings page of my wordpress plugin. The ajax call is made but the method never runs. In the page I ...
0
votes
0answers
185 views

problem when adding wp_editor with ajax [duplicate]

I have a problems with wp_editor() . Somewhere in my plugin, i want to dynamically add fields some are basic input, and there is also an editor. I use ajax to add these fields, and all is going as ...
0
votes
0answers
84 views

jQuery Ajax: re-executing plugin on success, when plugin function is NOT known beforehand

I'm a WordPress theme developer and I've building an ajaxified theme having structure like this ... <body> <div id="site-header"> content here </div> <div ...
0
votes
0answers
69 views

Page keeps refreshing with Ajax form

I have a simple form on my site with a simple jQuery Ajax call but the page keeps on refreshing. I know that the form is submitting OK but I can't get the alert to work. <script> ...
0
votes
1answer
23 views

I get a 0 after the result of my ajax requests

Every time I do a particular Ajax request at the end of the result I get a 0. Why am I getting this and is there a way to get rid of it? The result is good it's just followed by a zero for some ...
0
votes
0answers
46 views

Update_user_meta fails with ajax when used multiple times quickly

I'm trying to update the status of the sidebar (visible or hidden) when the user clicks the hide/show button in the user_meta so that no matter what computer he's on, he'll see his settings saved. ...
2
votes
0answers
354 views

Ajax form filter post by custom fields [closed]

I'm currently working on a site where users can search for apartments. I have a custom post type for the apartment posts, which contain several custom fields. I have a page where i list all of the ...
1
vote
1answer
55 views

Including the necessary functions for a custom ajax registration form

I know there are a few questions on registration forms but I think mine differs a bit as I haven't found an answer through searching. I'm making a simple subscribe widget that takes a user's email ...
5
votes
2answers
432 views

Creating Ajax backend for Specialised Page Template? Should admin-ajax.php be used?

We're scoping an upcoming project that will require the development of a large php web application within an existing wordpress site - this is for our use only and we've no intention of trying to ...
0
votes
1answer
36 views

jQuery AJAX add json2 dependency?

I am working on a voting system in Wordpress with jQuery and AJAX. To make this voting system work I need jQuery in my theme. So wrote the code down in my functions.php. But for some reason my script ...
2
votes
0answers
219 views

AJAX-login over https on a http page, is it possible?

I would like to a ajax login-form on every page. Most of the site's pages are served over http. The ajax-login request is over https. Everything works as expected if I am already on https and try to ...
0
votes
0answers
100 views

Get wp-load.php PATH with wp_localize_script and JavaScript for plugin

I just learned about wp_localize_script() and it's very cool. I read Otto's post and Gary Cao's post, but I'm learning Ajax so I'm trying to wrap my head around getting the path to wp-load.php this ...
1
vote
2answers
229 views

Update meta values with AJAX

I am working on a voting system in Wordpress. I first made it with GET requests but someone told me you should not use GET for this, So I started working with AJAX to update custom fields/meta values, ...
1
vote
0answers
39 views

Admin ajax add tag callback

Is it possible to add an additional callback to admin ajax? Basically, I'm trying to increment the value in an input field of the add form for a custom term after the form is submitted. After the form ...
2
votes
1answer
75 views

Ajax returning correct data BUT at wrong place

I'm trying how to figure out how to use AJAX correctly with Wordpress: (I've used it on other sites, but not in WP) I have this code in functions.php of a theme: function jquery_stuff() { ...
0
votes
1answer
463 views

Ajaxurl suddenly not defined

I am developing a wordpress plugin where I use an ajax call to submit form data, it was working fine and then all of a sudden I get a console error saying that ajaxurl (the url passed to the ajax ...
0
votes
1answer
130 views

Handling an Ajax form submit

I am developing a wordpress plugin that will create a contact form and then submit the details through an ajax request. jQuery.ajax({ type:"post", dataType:"json", ...
0
votes
1answer
50 views

Can't update WP Editor after Ajax

I want to update the WP Editor textarea after Ajax, but it does not work. I have the following in my Ajax success function: $('input#pn').val(response.name); $('select').val( response.category_name ...
0
votes
0answers
92 views

Post Rating System with wordpress

I'm using a Post Rating System with wordpress and jQuery, i followed this tutorial for that. ` jQuery(document).ready(function(){ jQuery("a.like:not('.voted')").live("click",function(){ ...
3
votes
0answers
32 views

How to reinit tinymce for wp_editor after ajax? [duplicate]

Basically if I call wp_editor via ajax it acts funny, I noticed it does not include 2 scripts it DOES include if i call it normally within a form (NOT thru ajax). I found some anwers like tinemce ...