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
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 ...
-1
votes
0answers
11 views

Google Maps InfoWindow and Chat Plugin Wise Chat [on hold]

In my Wordpress Page, I embed a Google Map. An InfoWindow is opened when a user clicks on The Marker. I have customized the InfoWindow to display do_shortcode( '[wise-chat]'), which is a shortcode ...
0
votes
2answers
540 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
votes
0answers
11 views

AJAX() post - how to avoid page getting blank when remote page refreshes

I am displaying content of the other website which refreshes periodically (refresh time is around 20 minutes). During refresh time, my original page gets blank. I would like to keep the content of the ...
1
vote
0answers
25 views

How to load next and previous posts by Ajax

I'm trying to load next/prev posts by ajax, but somehow it gets broken - first "next" posts click is working fine - posts are loaded. But navigation get broken - no "prev" link loaded (even if I'm on ...
0
votes
1answer
984 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
20 views

Custom PHP endpoint for a plugin's AJAX call

I am writing a plugin for the first time, and I have a problem. I am using AJAX in my plugin. My JavaScript file is in the folder ../wp-content/plugins/myplugin/js/ , and in it I am trying to call a ...
0
votes
2answers
449 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
2answers
16 views

No Object Properties sending form through AJAX

I'm using a Using modal window with + form to change the profile avatar. Like the following (functions.php): add_action('change_avatar', 'edit_avatar_function'); function edit_avatar_function($uid, $...
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
13 views

Wordpress is adding parameter to links in pagination loaded by ajax

To load posts without refreshing page I use this jQuery function: $.ajaxSetup({cache:false}); $("body").on("click", ".posts-navigation a", function(e){ pageurl = $(this).attr('href'); if(...
0
votes
0answers
27 views

Is it possible to change wordpress shortcode via javascript

Is it possible to change wordpress shortcode via javascript. Conditional shortcode like shortcode value=true if checkbox is checked else shortcode value=false if checkbox is unchecked
0
votes
1answer
497 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 ...
2
votes
2answers
379 views

wp_ajax_[service] returning 0

I have a few Ajax services that I'm setting up. All of them require being logged in so I've attached hooks into the "wp_ajax_[$service]". The problem is when I call these services I just get a "0" ...
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....
-2
votes
1answer
23 views

CSV generated through admin-ajax.php retuns empty [closed]

I'm trying to generate a csv file based on data passed through an Ajax post. The posted data are user id's, these are then used to retrieve the user's email which will be put into a csv file. No ...
0
votes
1answer
37 views

Redirect after saving form; and yet use wp_die()

I'm trying to redirect the user to a specific location. The redirect is a part of the function that processes ajax call. So the ending lines of my code are as follows - wp_redirect("/dashboard/"); ...
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:...
-4
votes
1answer
33 views

Pagination Using ajax

I want to use Pagination using ajax for custom post taxonomy. Many of codes are tried by me but at the last I was failed. So,how can i use pagination using ajax without plugin? When i am clicking on ...
0
votes
1answer
16 views

Ajax Comment: Page reloads whenever the comment submission form is reloaded

I noticed that when I'm trying to comment too fast in a page it's getting reloaded. I want to avoid reloading the whole page just because someone submits comments too quickly but I don't know where to ...
-1
votes
0answers
12 views

Gravity Forms text area with dynamic, conditional content

I have a Gravity Form which has a dynamically populated dropdown of all post titles, based on this tutorial. Following the dropdown is a textarea which I would like to have dynamically populated with ...
0
votes
0answers
32 views

Loading PHP Variables to HTML Div elements after AJAX process

I'm trying to develop a plugin for a client as per his requests. I'm having a hard time figuring out on how I can pass the values of a PHP Script File after it was called by a javascript ajax file. ...
1
vote
0answers
21 views

Radio buttons live refresh in the customizer

I've added a new section in the customizer with a radio button setting with three options. The new setting adds a CSS class to the site header. Everything works as expected except the live refresh in ...
13
votes
8answers
19k 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
2answers
2k 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 ...
2
votes
2answers
52 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 ...
-4
votes
0answers
25 views

Filter Ajax Dynamic Archives Custom Posts Always not Showing Correct Result

Hy everyones, I'm building filter search using multi select option, when I'm selecting the country and then result of filter search always show all posts Here is my template <div class="row"> ...
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
0answers
19 views

Converting fake php page loop to wordpress loop?

I was handed off a project that was created using backbone.js to be "WordPressified" and I'm having trouble converting the fake page loop in to a standard WP loop. When I first took this project on, ...
0
votes
1answer
39 views

Is it safe to use admin-ajax.php in the frontend?

I am using Filter Custom Fields & Taxonomies Light. I found out it is using admin-ajax.php in the frontend for the AJAX search even not logged in. See: https://plugins.svn.wordpress.org/filter-...
0
votes
1answer
818 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 ...
-1
votes
2answers
1k views

AJAX values converted to PHP Variables?

I just started playing with Wordpress and I have a question about the AJAX side of things. I think that I understand how the AJAX front-end to server side processing, back to font-end works. But, I ...
0
votes
1answer
416 views

Plugin not working locally, but works on server

This is a hail Mary throw, but I appreciate any ideas that could point me in the right direction. I had a "plugin" created for my wordpress site. I have a live site that is on a server and one that ...
1
vote
1answer
3k views

ajax for filtering posts by category in wordpress loops

I've been looking around for a way to filter my posts on http://www.waziproject.com/wazimagazine/ without reloading the page. So my question is if anyone can help me out to turn the following into a ...
0
votes
0answers
22 views

Generate and return a PDF file in functions.php

We have the following process flow: 1.) Users fills in a form (name and surname) 2.) Backend php scripts look for the record in local CSV files 3.) If record exists we would like to return the data ...
0
votes
2answers
40 views

Simple jQuery AJAX Request fails to run PHP Script

I have a fairly simple AJAX request for my WordPress site. My PHP function is a switch statement and all the other switch statements work except for the recent one I added (change_due_date). I ...
-1
votes
1answer
31 views

Combo box populating a DIV using ajax/jquery

What is a good technique (in 2016) to allow dynamic population of a Wordpress page? Basically I have to dynamically load a DIV in the webpage depending on selection of a combo box. BTW, are there ...
0
votes
0answers
24 views

get_user_meta empty when inside ajax hook

I'm currently implementing a wheel of fortune for a website. I'm storing in a user meta how many times a user has played and other things. When the user plays, it sends an AJAX request which draws a ...
0
votes
0answers
31 views

wordpress admin-ajax returns 0, what I do wrong?

I have no clue why my callback function is not fired, thus I got 0 as a response of admin-ajax.php. My main plugin file looks like this: require_once( BLUECARROT_DIR . 'class_bluecarrot_user.php' ); ...
-2
votes
1answer
34 views

What is nonce and how to use it with Ajax in WordPress? [duplicate]

I am trying to learn, how to use Ajax in WordPress with proper way. This is what I learned: Step 1: Create Ajax file and register it using wp_enqueue_script. function wpdocs_theme_name_scripts() { ...
0
votes
1answer
567 views

change attachment custom field onChange event

The form is in post creating window. Ajax is posting values, but the values doenst renews. Where can be problem ? Ajax <script> function dynamic_Select(field, aid, value) { console.log(...
-2
votes
1answer
89 views

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

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
1answer
497 views

AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0

For years I've set up php ajax calls and responses in my plugins like the following, with js error detection conditions as needed like... if( "<e>" == msg.substr(0, 3) ) { do_something(); } ...
0
votes
0answers
10 views

Plugin option page store draggable list in WP database

I have create a plugin. On the plugin option page I use a sortable list. I will save the order in a db table (example xxxtest). What's wrong. I see that ajax transmit (success alert) but nothing ...
0
votes
1answer
622 views

Not getting the Correct JSON response from Ajax Request

I am trying to save data from backend with ajax. But its returning data in HTML as well. But i want only JSON data. ////////////////////////////////// // Do Ajax Request to ...
0
votes
1answer
754 views

Load php function with AJAX on modal window

On a movie information wordpress theme i am developing, i have an href with text "watch trailer" on each cover of all movies. This brings a modal window, and that is working already, but i want to ...
4
votes
1answer
1k views

AJAX vs Fragment Caching for W3 Total Cache [closed]

I'm running a WP site with WooCommerce and I want to do some caching. I'm going to exclude the pages such as the cart/checkout for obvious reasons however there are a couple of the things on the site ...
0
votes
1answer
2k views

wp_handle_upload returns empty error array

I am trying to do an upload via ajax and really dont want to use the regular wordpress media uploader. It is too much stuff and all i want to do is upload single image. I have everything working the ...
2
votes
1answer
689 views

Shortcode in AJAX popup

I am trying to use a shortcode from Ultimate Facebook plugin to display a FB connect button in an AJAX popup and can't seem to get it work properly. I searched and used the solution given by djb in ...
1
vote
3answers
61 views

How to use wp_localize_script in a WordPress page other than functions.php?

I have a contact form in a WordPress page like this: $( '#contact_form' ).bootstrapValidator({ fields: { // ... }, submitHandler: function( formInstance ) { $.post( "../...