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

1
vote
2answers
25 views

Wordpress AJAX in header.php

I am currently studying Wordpress AJAX but keep getting error message (so the success function is not being executed) Currently I have changed the header.php (of twentythirteen theme) to include ...
0
votes
0answers
6 views

Getting data from database and use it to complete a form

I have the following files: Main plugin file: <?php /* Plugin Name: FixFormData Description: If you want to autocomplete a form with existing data, this plugin is for you. ...
0
votes
0answers
19 views

Get formatted variation name [on hold]

I am editing the "quickshop" plugin that is using ajax to add a product to cart from a modal. The problem is that when I add a product variation to a cart instead of "9-12 miesięcy; 80cm" it dispays ...
0
votes
0answers
13 views

Determining the table that posts belong to in a multisite setting

I am currently running a multisite and I would like to display posts from other sites in a site. To do this, I wanted to use AJAX so that when I click on the post it does not get redirected to the ...
-3
votes
0answers
17 views

Plugin (kk star rating) not working when I show more items on my page [on hold]

The plugin works fine when you first get it on my site (it shows all the stars and you are able to vote properly). However, at the bottom of my site there is a down arrow to "show more" items. When I ...
0
votes
2answers
16 views

wp_ajax handler with multiple class instances

Eight months ago I asked nearly the same question over there. But the Problem is still not solved so far. But I have an additional ideaa why it is failing. In the meantime my code advanced. I have ...
0
votes
0answers
16 views

ajax_wp is returning 0 for attempt of use in frontend

ajax_wp_nopriv_myaction is returning 0. I am trying to insert into a database by passing ajax data to a function. I know its using the javascript file, because it outputs an alert box of what the ...
0
votes
0answers
57 views

How to implement AJAX pagination for get_posts (CPT)?

I need to implement AJAX pagination: « Previous 1 2 3 ... 70 Last » for a CPT get_posts() loop: // main images query // all filters should be applied here $args = array( ...
0
votes
0answers
10 views

Woocommerce price value in currency order ajax problem [on hold]

I have a weird problem with a woocommerce website that I'm building. The currency is polish zloty, and I've set the right price formatting in woocommerce options. The problem is that it doesn't change ...
0
votes
1answer
33 views

Accessing an API with jQuery and AJAX

As a proof of concept I'm trying to access an API using jQuery and AJAX and posting the results to a page. After following some online tutorials and doing my best to put it all together, I have the ...
0
votes
2answers
76 views

Filter second dropdown (tax) based on first dropdown (cpt)

I've been googling and attempting this for over a week now with no success. I have a few custom post types (books, films, music etc), and a custom taxonomy (location). On my frontpage, I have two ...
-1
votes
0answers
24 views

How to obtain state as per change country in selectbox using ajax on same page? [on hold]

I have a problem. I can get state from database but am able to get state on changing country. Any suggestions to resolve this problem? ***ajax code:*** <script type="text/javascript"> ...
0
votes
1answer
18 views

admin-ajax.php (aborted) error when using jQuery.get

One thing that really confuse me is the following: When I load a javascript file via Ajax and I watch the http requests thats being made, then I see the following error in Firebug: admin-ajax.php ...
0
votes
1answer
3 views

Is it a good idea to init ajax functions only while 'DOING_AJAX'

I wonder if it is a good solution to add (a lot) ajax add_action() only if DOING_AJAXis defined. Normally my setup is something like this: add_action('init', 'my_ajax_init'); function ...
0
votes
0answers
14 views

Use proxy to bypass JSON restricion

I'm trying to pull content from an API that does not allow JSONP using jQuery and AJAX. Obvisouly I'm running into cross domain problems. The only work around for this seems to be using a proxy on my ...
1
vote
1answer
13 views

Restrict function call to page load but not ajax call

I use the following to stop Subscribers (and Customers) from accessing the admin area of my site: /** * Redirect back to homepage and not allow access to WP admin for Subscribers. */ function ...
0
votes
1answer
22 views

Adding instant search to wordpress page

I'm new to the site and to web development in general. I have a domain name, a hosting site, and wordpress installed. That took me most of a day. Now I'm trying to add this functionality to my site ...
0
votes
1answer
13 views

Using conditional staements to load plugins

I'm having some conflicts I think with a couple of plugins I have written that use ajax. As they load their resources on every page rather then just when needed I think it's causing problems. What's ...
0
votes
1answer
27 views

ajax call in wordpress front end

In my plugin i'm using two ajax calls in back end. that worked well. but to provide the same functionality in front end i loaded the copy of these two functions with another names and my code is: in ...
0
votes
0answers
15 views

Can You Require the Use of JavaScript in a WordPress Plugin?

I commonly use Mozilla Firefox for testing changes I make for a plugin that I'm developing. I also have the NoScript addon installed because it is also my main browser. I noticed that the ...
0
votes
2answers
14 views

Ajax not working for logged in users

I have this plugin "DWQA" in which the ajax calls work perfectly fine when the user is not logged into the site. But the moment user logs in to the site the ajax calls dont work. The variables that ...
0
votes
1answer
40 views

admin-ajax.php slow, how to speed it up?

admin-ajax seems incredible slow compared with an own and custom service entry point (site.com/wordpress/wp-content/myplugin/rpc.php?....). In our custom service entry, we actually load only : ...
0
votes
0answers
12 views

Change search to outpout category name instead of Post type name

Im using a ajax search which is great, however i would like to change it to show custom post type categorys instead of custom post type. I added the taxonomy for the custom post type categorys, and ...
0
votes
0answers
15 views

Get next post in category with AJAX?

I need a simple solution to load the next post in the category of the current post (in a custom single.php) with AJAX once the reader scrolls to the bottom of the page. I'm using a custom theme. ...
0
votes
1answer
30 views

'Dehighlighting' navigation once clicked

I'm using the Twenty Fourteen theme and I'm loading the pages using Ajax. What I want to happen - the menu bar to unfocus the previous page on the navigation bar and highlight the current page. What ...
0
votes
0answers
79 views

How to load more custom type posts through AJAX & LOAD MORE POSTS button

Guys I am a little stuck here. Unable to load posts from a custom post type through AJAX. Normally I have had been using this script http://goo.gl/lwfM5 It seems so that $wp_query is not getting the ...
0
votes
1answer
28 views

WP Load post with ajax and apply isotope

I ma using Ajax Load More to get my posts and show in a frontend, then I have applied isotope to the items. When I first show some items and applied isotope, it's working perfectly. But When second ...
1
vote
1answer
61 views

Using ajax with wordpress

I'm trying to get my head around ajax requests in Wordpress and am finding it hard to understand. Basically I have a form that has a number of steps and you move through these requests using ajax, ...
0
votes
1answer
29 views

Ajax Request with jQuery not happening

My problem is: Can't do a POST request with jQuery. Down here is the complete description: I created a link in a page (using the plugin PHP code for posts and pages): <?php $nonce = ...
0
votes
0answers
15 views

Audio TAG Not using MediaElement When Page is loaded through ajax

I am using APPL loaded to load all pages of the website. One of the page is the blog read page, where the entire blog is been opened up for user preview. Some blog pages have audio tags in it where ...
0
votes
1answer
41 views

I need to run a AJAX Fuction from within a WP_Query but only works on first item

I have a page where users filter results from the Ultimate WP Query Search Filter plugin. The results are shown in a DIV via an AJAX call. This is working 100%. However I have another AJAX function ...
0
votes
0answers
44 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 ...
0
votes
0answers
2 views

Accordion script fails after widget save process in admin [migrated]

I used the ddaccordion 2.0 script by Dynamic Drive to create an accordion function for a widget in admin area and some vexing issues are occurring as I cannot determine a solution. On initial ...
4
votes
2answers
141 views

username_exists() function can't be access without logging in

I'm using the following function in functions.php to check if a username exists in the DB function check_username() { $username = $_POST['user']; if ( username_exists( $username ) ) { ...
0
votes
2answers
60 views

Wordpress listen to $_POST in functions.php

I currently have the following function in my functions.php which checks if a username exists in the DB. function check_username() { $username = $_POST['user']; if ( username_exists( ...
0
votes
0answers
25 views

wordpress - ajax communication

This is the first time I do the ajax and I must confess that I am confused. What I want to do is to take the value of 3 Select html to make a request to my database that'll get me a score according to ...
0
votes
1answer
31 views

infinite scroll not working when logged out

The problem: infinite loop works only when the user is logged and then it shows posts that were not published yet. Once I log out, the infinite scroll doesn't work anymore. The setup: I have the ...
0
votes
2answers
64 views

Problems with plugin that fetches data from database with ajax

After some answers I have edited my code. This is my plugin structure stpl1 stpl1.php getuser.php In stpl1.php I have the following code: <?php /* Plugin Name: Wordpress Plugin Stijn 1 ...
0
votes
0answers
29 views

WP_Query, How to identify if the offset reached the max posts count

I'm doing a custom WP_query to populate my post list via AJAX with some filters. I load additional posts once the user click the 'Load More' button, this fires the $.ajax and on success adds the new ...
0
votes
1answer
54 views

Populating content dynamically via AJAX and Advanced Custom Fields [closed]

I am using a repeater field from Advanced Custom Fields to create multiple photo galleries. There are 4 pages and each page has multiple image galleries. Because of this, I want to reduce load by ...
0
votes
0answers
52 views

AJAX doesn't pass variables to the php function in the plugin

I'm creating a plugin that at a certain point has to use AJAX to pass information to php depending on the events fired by front end user on the different page. The event itself is when the user ...
1
vote
0answers
91 views

How to set a custom path, for ajax image upload folder in admin?

I am coding my first Wordpress plugin that handles some data for a custom (shop-like) post type. It also has an image uploader within a metabox, where you simply drag in your images and it ...
1
vote
1answer
22 views

Why does Wordpress Heartbeat login not refresh the nonces?

Here's an interesting experiment: Go to wordpress plugins listing page, notice the activate, deactivate links all have a nonce part in the request. In a second tab, log out of the site, and go back ...
1
vote
0answers
37 views

Wordpress ajax works on FF but not on IE & chrome

I have the following code <a href="#" class="loadmore centered" page-data="1">Show More</a><script type="text/javascript"> jQuery(document).ready(function($) { ...
1
vote
1answer
41 views

Using AJAX to generate front end / viewer end pages

I am currently trying to send certain data via POST method from code in the widget of my plugin to the theme's archive.php page. The code that contains the data for jquery/ajax is : <a ...
1
vote
1answer
60 views

What's the point of using Wordpress's built in admin-ajax.php?

I'm trying to understand why using admin-ajax.php is advantageous over doing something like this: add_action ('wp_loaded', 'my_ajax'); function my_ajax() { // Do Ajax, Check $_POST die(); } ...
1
vote
1answer
33 views

Can't get result from sql using ajax result

I'm using an AJAX form to feed the code something to lookup in db. Separate table, not WP options. I'm getting the result from AJAX, but when I try to do the sql it just returns 0. This is the ...
0
votes
0answers
35 views

Some shortcodes breaking after AJAX call

I have a content slider that displays my Academic posts on my website. Some of my posts have shortcode in order to display an accordion menu and some columns. I am using AJAX to fetch the posts and ...
0
votes
0answers
28 views

Using Ajax to autocomplete a form with data from db

I'm struggling to get the following: User fills out personal number Other input gets autocompleted with data from database As I have never made a plugin, help is greatly appreciated, my database ...
0
votes
0answers
85 views

AJAX filter posts on click based on category

This is my first foray into AJAX, I've been splicing bits of code from various tutorials which probably hasn't helped. I have a list of categories on my homepage (index.php) and a list of the most ...