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

0
votes
0answers
134 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
215 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:: <script&...
0
votes
0answers
59 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 ...
-1
votes
1answer
184 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
121 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
36 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
34 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
23 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 ajax-...
1
vote
2answers
121 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
229 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> <head></...
0
votes
0answers
71 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 ...
0
votes
1answer
90 views

Accessing an image via ajax

The goal with this is to create a random banner, managed in the wp admin. I can create a banner solution in the wp admin without an issue but need a little help on the ajax side. I have an image ...
1
vote
0answers
90 views

Audio Player not loading when the content is loaded through Ajax, MediaElement.js no applied

When I load the content using ajax it doesn't apply MediaElements.js to my audio player, so the audio isn't display. I think this is because the MediaElement.js is loaded with wp-footer(), and this ...
0
votes
0answers
197 views

Cannat load admin-ajax.php. No access-control allow origin*

XMLHttpRequest cannot load ..../wp-admin/admin-ajax.php.,. No 'Access-Control-Allow-Origin' header is present on ... When on local WAMP it worked just to put header("Access-Control-Allow-Origin: *...
0
votes
1answer
80 views

How can I use wp_ajax_response for front-end error reporting?

I already have the wp hook code in place, and now I want to send error messages back to the front end to be placed in alert box or html element. //my plugin add_action('wp_ajax_track_upload', '...
0
votes
0answers
12 views

Can't see audio when I acces with ajax

I have created an ajax portfolio. It works fine, but when I upload an audio, this is not display. If I acces to the post via my blog page the audio is there. I inspect this file and I discover a ...
0
votes
1answer
119 views

Retrieve post in AJAX Callback

I have a JS file that triggers a PHP callback file. The PHP file is supposed to work on the Post that is currently opened (wp-admin/post.php). I do not want the JS file to pass the post id though ...
0
votes
0answers
29 views

It is possible a Real-Time action in wordpress that reload its page on post update?

Is there a way in wordpress that whenever a post or any other content is updated then automatically all user browsers that are navigating the site get a real-time refresh page.
0
votes
2answers
80 views

load ajax using admin-ajax.php

The append result is 0, instead of a list with the title ass a link. If I check this locally (http://localhost/wordpress/wp-admin/admin-ajax.php?action=lateral_fluid), I get the titles ass a link. I ...
0
votes
0answers
81 views

add_action wp_ajax_ not loading in plugin file WP Network

I'm developing a plugin that relies pretty heavily on AJAX calls. It works well in a single-install version of WordPress, but when I ported it into a Network WP my AJAX functions stopped working (...
0
votes
1answer
183 views

Multiple AJAX requests using the same ajax_object.ajaxurl

I have a plugin that makes different AJAX calls, using the ajax_object.ajaxurl. Both AJAX requests are coded in the same file (emx-functions.js). It seems, however, that only one AJAX call is ...
0
votes
1answer
39 views

Submitting my form to the database and then redirecting to payment site

I am submitting data to my custom table and would then like to redirect to a third party who will handle the payment. (not PayPal). I have the following code which adds the data to the database. The ...
0
votes
0answers
186 views

Get WordPress Page Title, ID, or Template of the Page an AJAX Request is Made From and Pass as Variable in AJAX

I have a page template that includes a region that holds links to a series of video custom post types. Each of the links is tagged with an 'ajax-link' class so that through an AJAX request I can pull ...
0
votes
1answer
114 views

Jquery autosave text area after typing

I'm trying to learn how to use Jquery, and manipulate some existing code to do what I need it to do. I am wanting to edit this code to make an editablecontent text area save a certain number of ...
1
vote
0answers
190 views

Setting TinyMCE Content in wp_editor

I am currently coding on front-end editing in wordpress. The outcome should be evernote-like editing using wordpress posts. The Wordpress database stores markup without paragraphs and adds them on ...
1
vote
0answers
116 views

ajax category filter

I know this is a big ask for you guys, but i can't seem to figure this out. I found this page : http://www.bobz.co/ajax-filter-posts-tag/#comment-28112 it shows how to make a dynamic filter for post ...
1
vote
0answers
106 views

Call javascript function when category was added via ajax

I've created a plugin to handle featured images for categories (well, for custom taxonomy actually, but it doesn't matter). Everything is working fine, except the featured image is not cleared after ...
0
votes
1answer
335 views

plugin shortcode not working on ajax request call

I just bought the Visual Composer plugin from wpbakery, my problem is that I'm making ajax calls to get the content of posts that have been edited with Visual Composer when I get the data it only show ...
0
votes
0answers
59 views

Using gfapi causes admin-ajax to cancel

Perhaps this is better suited for Gravity Forms support, so I'll also look into asking there...however I'll post here just in case anyone has a solution. We're using Gravity Forms to handle ...
0
votes
0answers
64 views

Wordpress get value get_query_var('paged') of a url

Am creating a custom wordpress funtion that receives ajax url value , and i want to get the value of var paged of the received url see below code : functions.php function something() { $p= $_GET['...
0
votes
1answer
322 views

how to make custom ajax handler?

i'm trying to make custom ajax handler because the admin-ajax.php is taking to long to handle ajax requests from 7s to 10s so i google it and mange to do some custom ajax-handler.php like this <?...
0
votes
2answers
49 views

Enqueue script in plugin is not working

I can't figure out why this script wont load on site. Am I missing something? function ajax_follow_enqueue_scripts() { wp_register_script('follow', plugins_url('the-follow.js', __FILE__)); ...
0
votes
0answers
33 views

Load second wp_dropdown_pages based on first selection (children)

I have a wp_dropdown_pages dropdown with some pages. I want a second dropdown_page to load after the visitor selects an option with the subpages of the selected page. I feel like the "child_of" ...
0
votes
1answer
140 views

What WP-API authentication method should I use to interact with anonymous / not-logged visitors?

I am going to track number of plays of a video in my site by both visitors and users. Whenever the video starts playing I am using JavaScript for the event handling in the frontend and write to ...
0
votes
1answer
91 views

How to create a form button that executes a function?

Consider the following example: we build a conference website (could be a WordCamp) that allows speakers to submits talks, and where a jury decides which talks are accepted. To handle this in ...
2
votes
2answers
307 views

Class WP_Rewrite not found

Updating my WordPress to 4.4 I have that error: Fatal error: Class 'WP_Rewrite' not found The page who have the error is my custom ajax with the following code: <?php // Constantes propias ...
1
vote
1answer
65 views

How to set post_id to 0 when you upload image via Add media button. (async-upload.php)

How to set post_id to 0 when you upload image via Add media button which will make a requtest to async-upload.php Instead of actual post_id? Thank you.
0
votes
1answer
117 views

Is there a better way to access transients using javascript

I've been searching around the web trying to find a better way to use wordpress transients with javascript. Currently I am using admin-ajax to run a php function that retrieves the transient and ...
0
votes
0answers
7 views

transfer session to speed up ajax?

just an idea but since 4.x got even slower, might it be possible to just transfer an authenticated session to my own app? I hope in connecting both over a secured message bus (mqqt) would eliminate ...
0
votes
3answers
384 views

MySQL query in Wordpress with AJAX

I have a search form which searches the DB and returns back some data. I have managed to use Wordpress wpdb to connect and use select statement on the table and retrieve data. Everything works fine.....
1
vote
2answers
166 views

add_action and Ajax

I'm developing a plugin and I've started from WPPB and Wordpress 4.3.1. I've named it dogmaweb. I need to submit a form to the plugin via Ajax. The form is created by the plugin itself. In my class-...
0
votes
1answer
61 views

delete_user_meta Delete one value out of array

The code I have is not working cause the value saved as array and I'm not sure how to fix this. // Remove favorite authors from current users DB function fav_author_remove_user(){ ...
1
vote
1answer
45 views

How can I inject options into an select tag inside the widget form?

I created a widget, that retrieves filenames from the database and am now trying to output the filenames as options in a select tag inside the admin widget menu(the form function in the widget class). ...
0
votes
1answer
26 views

Why is the form not updating when I select a new sector from the list?

Im trying to fix a form on http://s195004125.websitehome.co.uk/jobs/ for some reason the sector selection box doesnt update the list below when a change ios made but it changes when you select a ...
0
votes
1answer
119 views

$_POST empty in using new php file added to theme

I am using a theme which handles form data with jquery (a handler function defined).I have added a new php file to theme (using it in as template in a wordpress page, also registered with rewrite ...
1
vote
1answer
237 views

AJAX nonce with check_ajax_referer()

I want to use check_ajax_referer() to verify a WP_nonce field using AJAX. Here you can find my html element. <input type="hidden" name="login_nonce" value="<?= wp_create_nonce('login_nonce'); ?...
0
votes
1answer
101 views

admin-ajax.php GET custom-post titles

I can't get the titles of my custom post. this is what i'm doing: //IN functions.php function fluid_scripts() { wp_enqueue_script('lateral-fluid', get_template_directory_uri().'/js/lateral-...
0
votes
0answers
217 views

Pagination for ajax category filter

I created an AJAX category filter for a custom post type with custom taxonomy. 1)It's working but can't figure out how to add pagination for the custom taxonomy once it filters. When I click on ...