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
30 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= ...
0
votes
1answer
50 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
35 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__)); ...
1
vote
0answers
78 views

paginate_links() and ajax

I've got a working query with working pagination but I would need to load these pages via ajax. Here's a simple demonstration: Question: If: default page is www.my-site.com/search/ second page ...
0
votes
0answers
23 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
44 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
58 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
117 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
39 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
48 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
6 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
63 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 ...
1
vote
2answers
132 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 ...
0
votes
1answer
22 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
22 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
13 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
58 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 ...
0
votes
0answers
38 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
43 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', ...
0
votes
0answers
78 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 ...
0
votes
1answer
23 views

WordPress Feedback popup with date saved into table

Spending now more then 2 days of searching and testing all kind of plugins, I need some help. I need a Feedback popup plugin with these tasks: front-end pop-up with main question + text area for ...
1
vote
0answers
44 views

How do I pass the id of my widget to javascript in the form function?

I would like to add a Quilljs editor to the admin area of my widget, but I am having trouble passing $this->id to javascript. I am using the foo_example widget code, and I've appended the ...
0
votes
0answers
22 views

AJAX - nonce verification fails

I have a simple add-to-newsletter widge. I created a hidden input with nonce: $nlnonce = wp_create_nonce("add-newsletter"); echo '<input type="hidden" id="nlnonce" value="'.$nlnonce.'" />'; ...
1
vote
0answers
49 views

Init plugin again after ajax call finish

We have this website that the navigation between pages work with ajax. in the blog page we use this great plugin to make the ajax load-more posts. all works great but the problem is that when you ...
2
votes
1answer
48 views

Comparing arrays within a loop

I am trying to write a save search function, where the user can save their searches, but I need some help in checking if the search is already in the database for the current user making the search. I ...
2
votes
1answer
80 views

Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]

What I eventually want to do is when user logged-in to the site, I want to redirect the to the page with all the post created by that user and I want to load them via AJAX request. I have save ...
0
votes
1answer
254 views

Woocommerce Ajax Add cart not working

In woocommerce ajax add to cart method not adding when cart is empty, if cart contains something then my ajax function adds but if cart is empty it doesn't add. And no error. Here is the link. PHP ...
0
votes
0answers
292 views

Insert data into mysql database with php and ajax

I made admin menu inside wordpress and I have form that allows admin to insert some values. I have html: <form id="prices_form" method="post" action=""> <div ...
0
votes
0answers
110 views

Ajax - Post Categories and Load More

I have a page_template on my front page where I want to show "all post category" by default with a maximum of 5 post, but there will be buttons for each of my category, so when they click on a ...
0
votes
0answers
25 views

Server side validation on AJAX form submit from front-end

My current server side validation is not working with AJAX submit. // Tracking error messages function write_here_errors(){ static $wp_error; // Will hold global variable safely return ...
0
votes
1answer
67 views

admin-ajax.php returns 0. How do I debug it and fix it?

Trying to use admin-ajax.php to upload image from front-end form. I'm keep getting 0 with below code I have and not sure how to debug this or where it goes wrong. I have HTML input file <input ...
0
votes
0answers
26 views

ajax pull and show how to show custom fields?

hi guys I have this code is part of essential grid, a plugin to show content. im trying to customise the ajax view of the plugin, that opens posts via ajax request. case ...
0
votes
1answer
113 views

Live search from database table

I have wordpress site. I made custom table and sotred values in one row. Now I made admin menu and added input field into it. <input id="location1" type="text" /> I need to predict search ...
0
votes
1answer
24 views

Can't retrieve any content from Ajax-loaded page

Once my_file.php is loaded through Ajax I can't get any WordPress content from it, even though Wordpress functions run without generating any error messages. Note that I'm doing Ajax the old school ...
0
votes
0answers
20 views

Ajax Wordpress: Load post title and custom fields

I'm customizing the Ajax output of Essential Grid Plugin that by default only shows the post_content. I need to show the_title and several custom fields. How can I achieve this by modifying the below ...
0
votes
0answers
11 views

Make youtube and vimeo videos work with ajax? [duplicate]

I have some videos , the url pasted in the content. the video displays fine but not when loaded via ajax, i just see the url. how can I fix this problem so youtube and vimeo videos render like ...
0
votes
2answers
41 views

How to get those data using with ajax json?

The following coding is the out come of an other page php echo user_list.php: $myarray=array(); ... ... $myjson = json_encode($myarray); echo $myuser->searchUser($myjson); and the result of ...
0
votes
0answers
110 views

AJAX image upload with a upload progress bar using media_handle_upload

I currently have post image upload for the featured image from front-end form. <input type="file" name="wh_image_upload" id="wh_image_upload" multiple="false" /> and using media_handle_upload ...
0
votes
1answer
55 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
0answers
15 views

How to limit each front-end user to view just his own uploaded files on Amazon S3?

In my Wordpress website Users can upload video files directly to a Amazon S3 bucket, all of them use the SAME bucket for their uploads. After the upload is done each user should be able to view/delete ...
0
votes
1answer
22 views

Not getting result using ajax on wordpress

I have used the following code on my functions.php page add_action('woocommerce_product_thumbnails', 'my_ajax_button'); function my_ajax_button() { echo '<button class="buy-this-room myajax" ...
0
votes
1answer
163 views

Ajax image upload with media_handle_upload and form.js

I want to have AJAX image upload on front-end form and can't figure out where it goes wrong. HTML form for image upload <form id="thumbnail_upload" method="post" action="#" ...
0
votes
1answer
239 views

Processing ajax call to php to insert into mysql database

I made top menu in wp admin dashboard. There I will have input field. It will be input where admin can enter Google locations. After picking correct location admin will press save and location will be ...
-2
votes
1answer
29 views

How to make a rest style plugin?

I created a plugin that is basically a crud to write to the mysql database. I want to know how to display the data on a wordpress page. I'm reading about url rewrites but it seems rewrites are for ...
0
votes
0answers
42 views

Trying to update User Meta with Ajax

I am trying to make a plugin to record the users browser based location as user meta data stored as Latitude and Longitude. This current version is trying to make user meta via form, but ultimately I ...
0
votes
2answers
37 views

Ajax call URL 404'ing when pushed to staging server

I have AJAX form submission working fine locally. But when pushed to my staging server the process page is 404'ing. I cannot access it directly neither as it 404's but checking on the server and its ...
0
votes
1answer
62 views

AJAX and do_shortcode

I know questions on this subject have been asked before. But I'm stuck and cannot find a way out. I am using Ajax to load external information to my site. Initially all the information was loaded at ...
0
votes
0answers
19 views

What is the best way to handle Ajax image upload on front end?

I have been searching around for awhile but haven't found a solution yet. For this question, I like to get some general answers or resources for implementing AJAX image upload in front-end form. ...
0
votes
1answer
51 views

Autocomplete for titles via ajax - rework of past post away from like_escape()

I'm trying to create an input field that can autocomplete only title from a CPT. They don't have to be linked, they just need to pull titles of a cpt alphabetically and searching from the first ...
0
votes
1answer
89 views

wp_ajax action is not run when ajax trigger

I'm trying to implement the ajax in wordpress world but now stuck. Function hook suppose to be called when ajax triggered is not happening. I check the network admin-ajax.php is called but ...