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

How to get CPT category checkbox list and show post of selected(multiply) checkboxes via ajax?

I want to create a plugin that outputs Custom Post Type category checkbox list(as in back-end WordPress) to show CPT posts that contain selected on front-end categories(multiply select) after pressing ...
0
votes
1answer
32 views

Why Does WordPress not output admin-ajax.php path by default?

It's not uncommon for WordPress sites to have 10+ instances of the admin-ajax.php path outputted to the front-end for use by plugins and themes. Does anyone know if there is a reason WordPress core ...
0
votes
0answers
17 views

media image not showing after adding ajax google api

I have added a script in my header.php and ajax file <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script>....</script> But due ...
0
votes
1answer
25 views

wordpress ajax return 0

I'm tryng to set up a panel, this one The menu on the top calls different ajax functions in order to display a thumb. Clicking on the thumb you can see the details in the last box of the panel. I ...
0
votes
0answers
15 views

How to select many posts from tinyMCE PluginManager

I am trying to create a plugin that allows authors to include (inline) recommended posts. I've created a tinyMCE button and I get the form where the user is supposed to select posts to include (max ...
0
votes
0answers
10 views

Using AJAX tab causing error in customizer preview

My homepage is using jQuery-ui's AJAX tab feature, but apparently this feature made a mess at the customizer's preview page. The following pic is basically what's showing at my customizer page right ...
0
votes
0answers
508 views

Woocommerce Ajax update cart quantity does not show cart totals section

I have installed the plugin woocommerce-ajax-cart. The plugin does everything correct only not show the cart totals section. It needs a F5 refresh screen before the cart totals section is shown. Do ...
1
vote
1answer
24 views

Why a strange discrepency between get_current_user_id() when using AJAX versus output of document.cookie?

I'm developing a simple Ajax function as part of a plugin intended to be used from within the traditional WP Admin dashboard but am encountering a discrepancy regarding the login cookie state. The ...
0
votes
1answer
87 views

Auto load subcategories content with ajax

Recently I posted a question here regarding deploying subcategories contents with AJAX. Thanks to ccprog, it works beautiful fine. However, another question occur after I shared it with my client. ...
0
votes
1answer
45 views

Send email via ajax

I have send email funciton on my home.php wordpress file and function is below $("#sendmailbtn").click(function(e) { var dataString = $(".pricing").html(); e.preventDefault(); var ...
0
votes
0answers
29 views

jQuery hover events within Ajax loaded div

I've built a custom theme for a WooCommerce site I am working on. I have recently added the Advanced AJAX Page Loader plugin to load all elements within the #content div. I am now having 3 issues. ...
0
votes
1answer
40 views

Ajax Function call is always returning 0 in front end(without plugin) [closed]

I am calling a function through ajax but always getting 0 in return. <?php get_header(); global $wpdb; $qry="select * from wp-terms where term_id IN(SELECT term_id as term_id FROM ...
0
votes
0answers
17 views

Ajax filter already filtered custom post list

Clearly relatively new to WP so this might be a dumb question but here it goes. I was able to fetch a custom post list of filtered posts in a specific price range (max.value of $100). Now I want to ...
1
vote
1answer
73 views

Best place to load wp_ajax_the_ajax_hook action in plugin

I am building a shortcode plugin and I want to avoid loading unecessary code unless the shorcode is called in a page. I am having trouble with the ajax functions. It seems I need to load everything ...
0
votes
0answers
38 views

loading wordpress post with ajax in div

I want to display a post with ajax in some kind of modal box which i created. On click on link, the modal is shown (display:block) and the content is loaded. Also a overlay is added. That works great. ...
1
vote
1answer
71 views

Why get_posts() not returning only selected category posts from Custom Post Type?

I use widget plugin Getting the random post & URL via ajax. Thanks fischi for help to rewrite functions. Problem is that function returns all posts from CPT, so category select doesn't work. ...
0
votes
0answers
23 views

Integrating with external cache solution? Causing problems with ajax nonce validation

We are using an external caching solution (Akamai), and it is causing problems with plugins that use ajax nonce validation, such as Mailchimp for Wordpress. I saw the WP_CACHE define, but it sounds ...
0
votes
1answer
73 views

How to get post category list as select in front-end?

I use widget plugin Getting the random post & URL via ajax. I want to add function, that allows users on frontend choose category, and than display random posts from this category. function ...
0
votes
1answer
71 views

Deploy Subcategories with Ajax not working

I am currently working on a project which I am trying to call out the subcategories contents using Ajax. The Subcategories name will be listed as a menu, to call out their individual contents. I ...
0
votes
1answer
27 views

Wordpress subfolder installation AJAX Problem

I installed a Wordpress distribution in a subfolder. Everything works fine: The rewrite rules a correct and so on. only my own private plug-in doesn't. I call per ajax the plug-in function via the ...
1
vote
1answer
41 views

Storing posts from query and accessing later via AJAX call

To clarify the above question title, what I am trying to do is create a grid of posts, for which I am displaying a thumbnail of an image that is attached to that post. Then, upon clicking each of ...
0
votes
0answers
26 views

WordPress form redirect after add_rewrite_rule

Two problems i got: automatically redirect from OLD url's to new one (eg. search form will redirect to old url and i need redirect to new one) - what the best method (htaccess, wp_redirect? now i ...
1
vote
0answers
33 views

WP REST API route request explain

Maybe can someone explain or show additional info about "WP REST API route request" from beginning to the end. Main questions, how handle this request in most earlier stage. For example for ajax ...
1
vote
0answers
47 views

jQuery.post not working within shortcode - Wordpress Ajax

I have a shortcode which works, only thing not working is my ajax callback function, which is not triggered and can't figure out what the error is. My functions.php for the shortcode and callback ...
1
vote
0answers
16 views

Create a Button alongside add to cart

i want to create a button alongwith add to cart that will perform a specific function. please tell me how to do this.Also can you tell me the css of this button so that the button looks exactly like ...
1
vote
0answers
16 views

Use just a shortcode from another page

I am building a bbpress forum and I have it set up right so that when you click a forum it displays a loading image and loads the link with ajax instead of redirecting the page However, this loads ...
1
vote
0answers
48 views

AJAX Request not working for Wordpress Multiple Shipping Addresses Plugin

I have a pretty urgent question and I need some help figuring out this issue. So I bought the Wordpress Multiple Addresses plugin because my client needs the functionality for their e-commerce site. ...
2
votes
0answers
52 views

How can I reuse the Wordpress search form for a custom plugin / widget?

I need to develop a custom widget to display posts, based on their ID. The user must be able to handpick posts. Right now, they can enter the post ID, but it is not convenient for them. Is it ...
1
vote
0answers
65 views

Passing jQuery value using Ajax to a page template

I have the following jQuery code:- jQuery('.fancymember').on('click', function() { var member = jQuery(this).parent('div').parent('div').find('.test').val(); var dataString = 'member='+ ...
1
vote
0answers
30 views

Dynamic Custom Fields

I am working on a custom invoicing system for a client. I am looking for the best way to implement adding products dynamically to the invoice in the wordpress admin. There are hundreds of products ...
1
vote
0answers
22 views

What is the best way to do MyAjax error and success handling?

I'm doing an API call and if the response code is 200, I'm simply sending the name of the course as the output. If it's not 200, it will give the user a variety of errors based off the if checks. I ...
1
vote
0answers
83 views

WP set auth cookie using Ajax is not saved to browser

We are creating an external dashboard that uses Wordpress data, obviously, we use WP REST API v2 We want total separation from the traditional WP Dashboard, but we also want to log in user "behind ...
1
vote
0answers
44 views

Random ajax load only works with posts_per_page set to -1

I created a post loader shortcode, that uses AJAX to load posts. Even though I can set the order and order_by query parameters, the order_by should be random. From what I've seen on the web, ajax load ...
1
vote
0answers
85 views

How to use jPList with search results

I've been working on a real estate site and looking for a way to refine search results page + update pagination, instantly, like the big name sites (ie hotpads.com, trulia.com, hotels.com, etc.). ...
1
vote
1answer
54 views

WordPress Ajax problem with undefined url

I have problem with wordpress plugin - in jQuery.ajax part, the ajax_object (url: ajax_object.ajax_url) is undefined and I don't know why. I cant recieve correct code from my php plugin, but if I ...
0
votes
1answer
22 views

Enqueue script in header

I'm having issues enqueueing a script in the header. I'm working on a Wordpress site where the page content is loaded via AJAX. To do this I have to enqueue the script with the AJAX call. I do this ...
0
votes
0answers
64 views

Create tabs in admin options page from custom post type loop

For a WordPress crm/password management plugin I am working on, I have created a custom post type called 'client'. I also have made a separate menu page for storing and showing the passwords of these ...
1
vote
1answer
74 views

Update user meta using with ajax

I want to edit user meta on the front using an ajax form, this is what i have: The form has the user ID: <form id="<?php echo $current_user->ID; ?>"... This is the script:: ...
0
votes
0answers
40 views

How to implement wp_localize_script with add_menu_page

I have a class Namer and this class adds a menu page (add_menu_page) and this in turn loads CSS and javscript, but I can't seem to load the wp_localize_script to do AJAX calls & Nonce, here is my ...
0
votes
0answers
43 views

WordPress Meta Box + WooCommerce - Display for specific product type right away?

So I've created a custom product type 'MY_PRODUCT_TYPE' and a meta box and that displays for this product type: function MY_PRODUCT_TYPE_meta_box($post_type) { $post_types = array('product'); ...
-1
votes
1answer
63 views

Gravity Forms closes my popup on Validation Error [closed]

I am having an issue with Gravity Forms. A user on my site can open a contact form in a popup menu by clicking a 'contact' button. The form is just in an absolute div that I show/hide on the contact ...
0
votes
1answer
61 views

Variable Products Being Added to Cart with AJAX on Shop and Category Pages

By default, Woocommerce ajax add to cart functionality is only supposed to apply to simple products on archive, shop, category pages, etc.. But for some reason it is also adding variable products to ...
0
votes
1answer
24 views

Allow guest to update custom post met using ajax

I have a simple click counter that works using ajax, only problem is that if you're not logged in you can't update the counter meta box of the post. In my case the post it's an ad that when clicked ...
0
votes
0answers
26 views

get_posts ( $args) failing when called by AJAX

Here's my code: function ajax_test(){ $default_workout_category = 61 //Hardcoded category for testing $args = array( 'category' => $default_workout_category, 'orderby' => 'title', ...
0
votes
0answers
13 views

Widget that allows image selection

I'm trying to develop a widget that allows the user to select an image to display on said widget. Right now, i'm getting the image from the library and displaying it's thumbnail on the widget's ...
0
votes
0answers
16 views

How to Lazy Load only Selected Images on Selected Pages?

I have one single page (of many) on my site where I want to lazy load images... And on that specific page I don't want to lazy load the first 2 images. How can I achieve this? Any pointers would ...
0
votes
0answers
18 views

Do I have to include all of Wordpress when using ajax in my plugin?

Based on some reasearch I've done with ajax-calls I understand there can be several things that messes up ajax load times for wordpress. The major thing is that all of Wordpress is loaded at each ...
1
vote
2answers
78 views

Why is my ajax call refreshing the page?

I'm attempting to upload an audio file via AJAX form. Here is my HTML in the profile-edit template. <form method="post" id="my_upload_form" action="" enctype="multipart/form-data"> <input ...
0
votes
0answers
168 views

How can I use ajax in WordPress to refresh the page without reloading the Page?

How can I use Ajax in WordPress to refresh my div content after certain intervals without actually reloading the page. I am struggling with the code. My Ajax code. <html> ...
0
votes
0answers
44 views

Lazy loading Ajax offset not working

I am attempting to create a lazy loading ajax feature on my site. There is a 'click more' button which will then load 10 posts via ajax and append them to the HTML container. I want to display 10 ...