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

Is it safe to use $_POST directly in my plugin instead of using admin-ajax.php to receive data from ajax?

When we want post data from frontend to WORDPRESS everyone says i must use admin-ajax.php. But i can add query vars and receive posted data in my plugin file using a global variable, and then i can do ...
-2
votes
0answers
11 views

Custom search field autocomplete [on hold]

I really need some some help here. I have a custom template on which I have a textbox. What i want is to get facility names from a different table on the same server . the facility names should ...
0
votes
0answers
38 views

Error function main() is a non-object to construct my Ajax.php

Try to use a "rapid" ajax, I've the follow code in my my-ajax.php file define('SHORTINIT',true); require_once ('../../../../wp-load.php'); require_once ('../../../../wp-config.php'); require_once ...
0
votes
1answer
29 views

How declare Ajax functions ussing SHORTINIT

I try to use SHORTINIT in my wordpress to do Ajax more fast, but I try to declare my functions and don't return any value. My code is: define('SHORTINIT',true); require_once ...
0
votes
1answer
21 views

Call admin ajax using absolute url? Relative URL breaks (frontend ajax)

Hoping There is an easy way to do this/I am doing something horridly wrong: I'm trying to simply display a list of post titles. When a user clicks on the title it will display that said title's ...
0
votes
1answer
22 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 ...
0
votes
2answers
28 views

ajaxt returning object object [closed]

This is my ajax: functions.php and script file add_action( 'wp_head', 'so_enqueue_scripts' ); function so_enqueue_scripts(){ wp_register_script( 'ajaxHandle', get_template_directory_uri() . ...
0
votes
0answers
25 views

Wordpress NetworkError 403/404 : for /wp-admin/admin-ajax.php on this server [closed]

admin-ajax.php file not found in registration using userpro plugin. i check field validation using admin-ajax.php its workind but click on register button using admin-ajax.php its not working ...
0
votes
0answers
24 views

Manipulate all post in the front end with javascript [closed]

I need to manipulate all post in the front end with javascript, how can i get all the post with ajax?
0
votes
0answers
36 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 ...
0
votes
0answers
14 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
1answer
24 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
21 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
15 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
51 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
31 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
35 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
57 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
18 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
58 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 ...
-2
votes
1answer
17 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
19 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
21 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
30 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
12 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() );?> ...
1
vote
0answers
64 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
14 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
18 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
81 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
29 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
19 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
26 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
26 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
62 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
256 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
50 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
30 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
64 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
94 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
169 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
38 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
24 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
12 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
9 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
18 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
40 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
55 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 ...