Skip to main content

Questions tagged [ajax]

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-save functionality on post and page editing screens. Several themes and plugins also use Ajax; for instance, some post rating plugins.

0 votes
1 answer
2k views

jQuery ajax method does not return data

I am sending email with phpmailer, I receive the emails when I press the "send" button, but I wanted to stay on the same HTML page, so I used AJAX script with HTML and PHP. The problem is ...
0 votes
1 answer
778 views

WP Cron as Fast as WordPress AJAX?

I have a question about performing a very long and resource intensive task within WordPress. Here is the scenario. I have a plugin that allows users to run a task that takes a very long time and ...
0 votes
1 answer
3k views

Get posts by category via ajax

In my page-members.php I output my list of categories <?php $args = array( 'orderby' => 'slug' ); $categories = get_categories($args); foreach ($categories as $category) ...
0 votes
1 answer
2k views

WordPress AJAX load post metadata in modal

I have a custom page template (front-page.php) and I have a custom metabox which is assigned to this page template. Metabox have 7 sections, and each section have 2 inputs. It looks like: 1. Client ...
0 votes
2 answers
866 views

Why Ajax Doesn't Work?

I have a separate page at the root of WordPress, for processing certain data, with the "wp-load.php" file connected to it. <?php require_once( dirname(__FILE__) . '/wp-load.php' ); ...
0 votes
1 answer
2k views

Failed to load resource: the server responded with a status of 404 (Not Found) admin-ajax.php

Failed to load resource: the server responded with a status of 404 (Not Found) admin-ajax.php while insert image in to post, and when I add custom html widget in to side bar this error will appear....
5 votes
1 answer
12k views

wp_query->max_num_pages always returns 0 on custom post type

Hi there I am developing a theme where I have to load some posts with ajax, in my index page everything works properly, the problem is when I need to use it on custom post type, I pass the values for ...
0 votes
1 answer
1k 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
2 answers
975 views

Admin-ajax.php 404 error

im trying to submit the following form but it just wont work: HTML: <div class= "container"> <div class="row"> <div class= "col-md-10 mx-auto text-center&...
0 votes
1 answer
700 views

Admin Ajax returns "0 200 OK server error.." in Multi-site sub-site

I'm aware admin-ajax.php is intended to return '0' if there's no action set. My issue seems to be that it's returning an error after the '0'. Accessing the file mu.site.com/wp-admin/admn-ajax.php ...
0 votes
0 answers
25 views

I got this error POST https://localhost/meraboilerwp/[object%20Object] 404 (Not Found)

//this is my functions.php // Enqueue Styles function meraboiler_enqueue_styles() { wp_enqueue_style('google-fonts', 'https://fonts.googleapis.com/css2?family=Patua+One&family=Open+Sans:wght@...
1 vote
1 answer
3k views

ajax multiple Values

i tryed to return multiple Values from an Ajax Call, I would Like to retun Value a and value b in two separat Variables in my Ajax function. Is it posible to do that? or could I use an Array? Or ...
3 votes
1 answer
2k views

How to Use JSON With AJAX?

I've defined a PHP callback function to handle the communication between server-side and client-side: function json_render_modal_body() { check_ajax_referer( THEME_PREFIX . '-modals', 'nonce' ); ...
0 votes
1 answer
1k views

How can I run two AJAX requests simultaneously in WordPress?

Kinda stuck here working with AJAX and trying to show posts based on user interaction. Right now I have it working where user makes a category dropdown selection and the posts load accordingly. What ...
0 votes
1 answer
2k 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(...

15 30 50 per page