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

-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 ...
-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
24 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
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
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
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
-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
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 ...
-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 ...
-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
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 ...
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
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
39 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 ...
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() { ...
-1
votes
1answer
30 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
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
42 views

Persistent Shortcode Attribute Variables using WP_Query and WP AJAX

I'm trying to: list posts using a shortcode using WP_Query have that list use pagination have that pagination use AJAX ...and - where I'm getting stuck - manipulate my list via shortcode attributes ...
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( "../...
0
votes
0answers
30 views

custom taxonomy not working in wp-job-manager

I'm working with the wp-job-manager plugin, and i need to add some custom fields in my search filter. I'm using another plugin for adding custom date fields, and it works perfectly. So i started using ...
1
vote
2answers
53 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 ...
1
vote
0answers
34 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
10 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', '...
1
vote
1answer
24 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
1answer
36 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 ...
-1
votes
0answers
42 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
21 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 ...
0
votes
0answers
24 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 ...
0
votes
0answers
20 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
0answers
24 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
27 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 ...
0
votes
0answers
47 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
53 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
1answer
17 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 ...
0
votes
0answers
14 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] => ...
0
votes
1answer
48 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'...
1
vote
1answer
40 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 ...
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 ...
0
votes
1answer
72 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
81 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
1answer
63 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 ...
-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
2answers
44 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 ...