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
17 views

Ajax take too long to return code

I'm bulding a new web site and I need use ajax to search and return some pages/post. I don't know the problem but my ajax need 2s or 3s to return the HTML structure with the page and some photos (this ...
-4
votes
0answers
21 views

Woocommerce - remove product with ajax [on hold]

I would like to add ajax to the remove product button at the woocommerce cart page, for removing each product individually. I came up with the code below, which i inserted in my theme's functions.php, ...
0
votes
0answers
8 views

Ajax WP_List_Table in Admin Edit Post Page

I need to show a WP_List_Table with a list of custom posts types inside the post edit page. I followed the instructions at this link. The ajax part works fine, but now I have a problem when I try to ...
0
votes
0answers
18 views

How to use ajax in wordpress plugin to get data from coustom DB?

i have created php script that work great as stand alone. now i need to create this script as wordpress plugin. so i have created custom table in wordpress DB. then i tried to make the ajax call. in ...
-1
votes
0answers
20 views

AJAX php function won't hook

I don't know why this is happening but I have this code that I am trying to run but I can't get it to hook. $(document).ready(function(){ $("#login").click(function(){ alert( "loaded" ); ...
0
votes
1answer
10 views

Quick Edit: Selected Custom Taxonomy Not Refreshing After Save

This seems to be a common problem as it was asked here but I can't seem to fix it on my own installation. I've setup a filter to modify the quick edit button to identify the correct selected value for ...
0
votes
2answers
39 views

Passing PHP Variables to AJAX Loaded Pages

I have a blog that shows 9 blogs posts per page, with each additional page of blog posts automatically added using the Infinite Ajax Scroll plugin. Every time a blog post is successfully queried the ...
0
votes
1answer
27 views

the_content() shows shortcode instead of parsing it

I'm loading a given post data via Ajax. The problem is that a plugin's shortcode is not parsed. The plugin is "Ninja Forms". It outputs [ninja_forms_display_form id=5] Instead of rendering the ...
0
votes
0answers
13 views

Get WooCommerce pay form via AJAX [closed]

I've been bashing my head against the wall with this on and off for weeks now. The scenario is as such - We have a series of select options which are parent products, parent product variations and ...
0
votes
0answers
25 views

While doing ajax, WordPress returning internal server error 500 and stating that my theme functions are undefined

I have an ajax call in my js file loaded in footer (it actually doesn't matter if I make it simpler or without the json parsing, I will get the same errors) - in this case I pass the callback and any ...
1
vote
2answers
45 views

Wordpress Nonce Issue for Ajax Login and Logout

I am using ajax to submit log in and log out credentials. The log in and log out forms are replaced with html returned by a successful response. No page loading is happening page content is loaded via ...
0
votes
1answer
15 views

How to HTML5 FormData Ajax

How do I use FormData in wordpress ajax ? I am appending files and strings to formdata. var formdata = new FormData(); formdata.append('name', 'This is Name') $.ajax({ url: ...
0
votes
0answers
47 views

Ajax URL not saving data

I have a submenu admin section under my custom post type which lists the custom posts by category. I have applied jQuery sortable and it all works fine except for the actual saving to the postmeta in ...
-1
votes
1answer
16 views

Wordpress portfolio pagination on home page

I am new to wordpress i am trying to add pagination to my home page that shows portfolios, example there are total of 80 portfolios when i open my site it automatically shows all 80 portfolios on home ...
0
votes
0answers
16 views

How to add hyperlink with meta-information to each post?

I'm a novice at Wordpress as a developer and I need to have a hyperlink in each post which will add post in different collections (with usage of post2post plugin). Is it possible to do so if I'm ...
0
votes
1answer
18 views

Ajax resetting my global variable

I am wondering why I can't read the updated value of $_TEST. It seems that $_TEST is being reset with each Ajax call. // functions.php $_TEST = 0; // the variable I want to update with each Ajax ...
0
votes
0answers
25 views

Ajax login without redirect/reload

I've successfully created a login with Ajax, in part to this tutorial: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/ My problem is that it requires a redirect at the end to ...
0
votes
0answers
10 views

Getting logout confirmation page despite nonce

I implemented an Ajax login on my site, and that part works great, but I'm having issues with the logout. For the logout, I'm using the default link: <?php echo wp_logout_url( home_url() );?> ...
0
votes
0answers
49 views

Create post using Ajax

I want to create post using Ajax . I had followed the process from Insert Post using Ajax But I couldn't make it work. Here is what I did. Please see what I did wrong as I am just a learner. EDIT ...
0
votes
0answers
13 views

Usage of wp_send_json_success and wp_redirect at the same time

I have to send the success response to ajax if user filled the form fields successfully or not on the client side and redirect to the other page which finalize his authorization at the same time on ...
0
votes
0answers
3 views

calculating sums for dynamically added form elements [migrated]

I have below form, where each .form-row is dynamically added using jQuery when user clicks on Add New button. My html form (simplified) <div id="total_sum"> <!-- here will show up total ...
0
votes
0answers
13 views

My function ajax only be called only once

Well...I've one problem when I using ajax in wordpress. I'm using ajax when in the site anybody will send me a email (like a contact). I used my function in my page "Contact" and it's works. But I ...
0
votes
1answer
62 views

How to filter post data with AJAX on page?

I have build a custom post_type with "Work items" in order to enter my personal portfolio items. The "Work items" have taxonomies like "Graphics", "Websites" etc. I am able to display them all in an ...
0
votes
1answer
28 views

Ajax call theme functions from front

Here's what I try to do : calling a function in my theme functions.php from the front of my theme. So, on the front : $(document).on('click','.btn-vote',function(e){ ...
0
votes
1answer
18 views

Add image to post from external URL

I'm doing a plugin that can retrieve media from external APIs, and when I click on it (on the admin), it insert a new post with the media, its caption, etc. So, now, I'm inserting a new post on click ...
0
votes
0answers
25 views

Using AJAX for chained selections

I have a form with two select elements, one is to select a type, and the second is to select an account that belongs to the type selected in the first select element. In order to enable AJAX in ...
0
votes
0answers
25 views

Ajax add_post_meta()?

I've got a custom meta field that I need to work with ajax (like the tags field). This is the function I currently have: function prfx_meta_save( $post_id ) { // Checks save status $is_autosave = ...
0
votes
0answers
57 views

Use jQuery and AJAX to get HTML

I have a jquery function in my theme that should send an array of filters to a PHP file, which should then return a piece of HTML with the filtered posts (it then replaces the contents of a ...
1
vote
2answers
175 views

Can't get a JSON object in response to an ajax request with wp_ajax

I have a problem with WordPress and ajax. This is my javascript part (I trimmed it a bit): var posts = $.ajax({ type: 'POST', url: ajaxurl, async: false, dataType: 'json', data: ...
0
votes
1answer
44 views

Scrolling Posts with Ajax

This is a very common question all over google , but there is a conflict between the ways we can handle this. I use this tutorial ...
0
votes
0answers
27 views

Using wordpress with AJAX queries

I have built a custom theme for wordpress and I decided to use AJAX instead of just refreshing the page on each call. However, when I add the Wordpress loop to call in my data, it doesn't load at all, ...
0
votes
0answers
55 views

Passing JavaScript variable to PHP popup

I have a popup that has a list of people. The user is allowed to select up to 3 people that they would like to compare. I then would like to show them a page that's comparing the 3 people that they ...
0
votes
0answers
86 views

Multiple Ajax Data Action

From this tutorial, how to create multiple data on ajax action in the code below? <script> function term_ajax_get(termID) { jQuery("a.ajax").removeClass("current"); ...
0
votes
0answers
125 views

Multiple AJAX filter posts on click based on category

I tried this tutorial. I'm having problems. Can this be implemented in two filters with the same kategory? I mean, I want to separate the products popular and latest products. But the same category. ...
0
votes
0answers
15 views

Error when using Ajax in plugin admin area?

I try to send a post from wp-admin to email like this: jQuery(function() { jQuery("#send_newsletter").click(function() { var subjecttitle= jQuery("#subjecttitle").val(); var ...
0
votes
1answer
36 views

Ajax return 0 in plugin - ajax only used in wp-admin

i use ajax a lot and have no problams with it. This time i am trying to use ajax inside wp-admin and only their aka this is not a "nopriv" issuse. This is being used inside a plugin i am writing. ...
0
votes
0answers
22 views

Is custom behaviour possible when asynchronously uploading?

I'm using Plupload and making use of wp-admin/async-upload.php to allow my website's users to upload images from the front-end asynchronously. The default behaviour of that particular script is for ...
0
votes
0answers
11 views

Disable ajax on custom taxonomy form

In my plugin, I have create a custom taxonomy, service (similar to default category). I want to attach a file with the service. I have completed the updates to form as well as the code that should ...
0
votes
0answers
8 views

AJAX Returns an error when deleting post

I would like to delete the post using wp_delete_post via AJAX however while wp_trash_post works beautifully, the wp_delete_post returns an AJAX error. I used WP_Query to delete the post that is in ...
0
votes
0answers
16 views

Ajax messing up my query DOM render

The following code fetches custom post type title and meta into links that are used as additional page menu. It renders fine until I go to another page and back. My theme uses Ajaxify Wordpress Site ...
0
votes
1answer
17 views

Custom RPC end-point security best pratice?

I trying to figure out how a custom entry point can be secured without loading the entire WP-stack. The built-in AJAX entry point is pretty slow and actually unusable on sites with lots of plugins. So ...
0
votes
0answers
36 views

Plugin calling HTTP_X_REQUESTED_WITH

I'm writing my first WP Plugin. I have a form that saves the input data after the data is entered without having to submit. Everything is working but I am unsure if I am calling HTTP_X_REQUESTED_WITH ...
0
votes
0answers
50 views

Display wordpress post's in popup?

I am developing a wordpress site with some blogs.Each blog post will have an READ MORE link.when clicking the READ MORE it should open a popup box with that post contents. Can any one suggest me on ...
0
votes
0answers
50 views

How to update post with Ajax (no plugin)

There was a tutorial a while back that was published to show how to ajax-ify publish/update posts, here's the code from it: function my_post_type_xhr(){ global $post; if('my_post_type' === ...
0
votes
0answers
36 views

how to load post content when a post title is hovered using ajax

i have a wordpress blog and i need to make my posts content show up when vistor hover the title of the post on my index page with no need to get into that post , exactlly like in the following site : ...
0
votes
1answer
60 views

Multiple wp_editor instances in custom post type using Ajax

In a custom metabox, I need to generate a tinny wysiwyg wp_editor everytime we click on a button.. I struggled a lot with this and couldn't achieve it. The js $.ajax({ url: ajaxurl, data: ...
0
votes
1answer
32 views

Long Polling: Stuck in while loop

I'm trying to write a long polling function, that only returns data to the client as soon as some custom post_meta is updated. This custom post_meta is a unix time stamp, which is then compared to the ...
6
votes
4answers
754 views

Is there a JavaScript API? How to access public and private data in JS?

According to this post there is no built-in JavaScript API for Wordpress. Therefore developers who want to build on AJAX seem to come up all with their own solution which doesn't seem right to me. ...
0
votes
0answers
29 views

lazy loading facebook feed on scroll

I'm currently using this plugin on my site: https://wordpress.org/plugins/ajax-load-more/ it allows posts/excerpts to be dynamically "lazy-loaded" ajax style as the user scrolls down the page. I'm ...
0
votes
0answers
148 views

Speeding up admin-ajax.php

I'm currently playing around with AJAX forms, but I've noticed that admin-ajax.php is quite slow. If I simply return the word 'test', it takes around 1400ms. I'm assuming it's because it's loading ...