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
27 views

Ajax form nonce fails

I have a email form in Wordpress and I'm using ajax to with it. I'm creating a nonce in the form and checking it before I send the email. The nonce fails but the output shows it is the same nonce. ...
0
votes
1answer
277 views

How to use get_posts() function in functions.php

I am trying to load posts with ajax. But I am not getting any content of the posts. I am not posting my javascript since it is pretty straight. Here is my code in inc/helper-functions.php which is ...
0
votes
0answers
36 views

Form submissions not posting to database / displaying in dashboard

In the process of building a simple contact form plugin. For some reason - the data from the form submission is not being posted to the database /and or displaying in the WordPress dashboard. If ...
1
vote
2answers
22 views

AJAX not Working with php as supposed

I am creating a like system in PHP . My code looks like this . <?php class Like_System { private $userid; private $postid; private $user_ko_like_count; private ...
0
votes
0answers
145 views

Ajax jQuery doesn't work in mobile

I created an Ajax file to send data to my functions.php and then return values to the Ajax file. PC works perfectly, but in mobile, on an iPhone in this case, why is it not working? This is my ...
0
votes
1answer
211 views

Cache plugins and ajax nonce verification

I created a plugin which use some ajax requests to load more posts on click. I noticed that when I use a cache plugin like W3 Total cache plugin then the wp_verify_nonce($nonce, $action) fail ...
0
votes
1answer
34 views

Can Ajax Action [add_action('wp_ajax_{action_name}', '{action_name}'] be hooked into wp hook

Just curious - whether AJAX Action can be hooked into wp hook? For Example: add_action( 'wp', array( 'MyAjaxRegistrarClass', 'ajax_registrar' ) ); // MyAjaxRegistrarClass class ...
0
votes
0answers
278 views

Need to save data to database from AJAX phone submit form

I have an input that accepts a country code (a select/dropdown form) and a phone number (number input) and submits them via AJAX to a pin verification service. The verification works great, but I need ...
0
votes
1answer
57 views

Is there a way to optimize function that is used for returning data in an ajax-call?

I've started creating some plugins (not offically deployed yet) (feel free to use it you want to), and now my goal is to include a custom post type and taxonomy and being able to use Advanced Custom ...
0
votes
2answers
291 views

Passing variable data from external jQuery file to options.php

I'm setting up a plugin that requires passing of a variable from a stand alone jQuery file to options.php. I have (I think) set up the scripts to be used in my plugin file like so: function ...
0
votes
0answers
69 views

Initial load of category jquery

I've succesfully implemented this jquery I found in another thread, using ajax to load different categories.. Problem is that posts are only loaded after a click - i'd like to display one category on ...
0
votes
0answers
43 views

Transposh reverts to original language after Ajax request

When using Transposh, the translation goes back from French to the initial language each time an Ajax request is made by the theme through BuddyPress. Here is my website, using the theme Sweet Date. ...
0
votes
0answers
102 views

My AJAX requests take 30 seconds to complete

I am a wordpress newbie messing around with a wordpress installation on localhost using XAMPP and I've encountered a weird problem that I can't find any information on. The problem is that every time ...
0
votes
0answers
202 views

How to add a Load More button for get_categories()?

I want to add an Ajax "Load More" button for category post display. I want to show only 6 categories per page. However, the other categories are loading after clicking on the button. Can anyone help ...
0
votes
0answers
27 views

Select from a list, keep the layout besides from one div

Hi Wordpress experts out there! :-) I want to confirm that I am thinking correctly regarding to how to achieve a thingie... I have page with a layout like this (simplified) {header} {column 1} ...
0
votes
0answers
204 views

Ajax request not working on firefox

myscript.js jQuery(document).ready( function ($j) { $j('#button').on('click', function () { var data = { action: 'time', type: "POST", time_var: 'day', ...
0
votes
0answers
34 views

How to link images to a certain property type

I've build a web page, in which an user certain data; the user can add also images, and once everything is done, he/she clicks submit and a Property post type is added. The problem is that the images ...
0
votes
0answers
64 views

Loading WP post with AJAX in Fancybox with home in background on post URL visit

I'm developing a WP site where product thumbnails (post's featured image) are displayed on the homepage and when the user clicks on one of them, the post is loaded inside a Fancybox with AJAX. I want ...
0
votes
0answers
359 views

How to make AJAX call to custom PHP file in Woocommerce?

I've run into some problem of Woocommerce when I tried to make an AJAX call on Checkout page to my custom PHP file uploaded to my theme's folder. After googling a while, I still don't quite understand ...
0
votes
1answer
26 views

create a custom field that let me include other posts

I need to create a custom post type with a single custom field that is, basically, a list of other posts id. In order to find that ids I would like to add a kind of "ajax search" ability to that ...
0
votes
0answers
28 views

WP_Query for liked posts is showing all posts if none are liked

I'm using the plugin Favorites for WordPress to allow visitor's to like products presented with a Masonry grid on the site. On the site I have a page which lets the visitor see all his or hers liked ...
0
votes
2answers
281 views

Ajax call returns 0 when add_action is inside a class in functions.php

Ajax call returns 0 as output. I am sure that hook is not working and it's not calling the test2 method. Why is add_action(... not working inside class in functions.php? --------Wrap inside ...
0
votes
0answers
523 views

How to configure Dropzone.js to work with Wordpress media attachments

I have built a site that has a public front end which shows off profile pages for cars. I have built a members only back end which allows people to create accounts, and then make a profile page for ...
1
vote
1answer
119 views

How to use oEmbeds on Post Content during AJAX requests

I have an AJAX request that returns a post. The post_content has links to Twitter, YouTube, TED and other platforms that are registered as oEmbed providers in a default, vanilla WordPress install. By ...
0
votes
0answers
159 views

[jQuery]Adding shortcode

I have been struggling with this the entire night, with no hope of ever reaching my goals. I have browsed through several books worth of support pages, but I can't get this to work. I am trying to ...
0
votes
0answers
19 views

Retrieve localised value

I have send ajax request wp_localize_script('fw-alt-block', 'ajax_custom', array( 'ajaxurl' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('cr_ajax'), 'loading' ...
1
vote
1answer
73 views

Loading custom content type from ajax results?

Using WordPress 4.3 and we have a custom post type with custom fields. It's easy to just import all of this content from a DB to the WP DB and everything will be there. Problem is, all internal work ...
0
votes
0answers
51 views

How do respond with a chunked response via WP Ajax?

I think I'm missing something because it never spits out the lines progressively but instead, waits for the whole thing to finish and then respond with all of the lines. add_action( ...
0
votes
0answers
16 views

In Theme Customizer, need to reference outside control values from within checkbox's value bind

This post pertains entirely to the Wordpress Customizer (Wordpress 4.3). I have the following controls: Text input "Disclaimer" Text input "Global Disclaimer" Checkbox "Enable Global Disclaimer" ...
0
votes
0answers
31 views

Skip over get_header()?

I'm trying to retrieve the content of a page with AJAX and am hoping that there's a way to essentially skip over the header. What I would like to do is get the rendered content of the page returned to ...
0
votes
1answer
297 views

adding ajax load more to display images from meta box

I am using metabox's advance file uploader to upload images. <?php $images = rwmb_meta( 'tj_file_advanced', 'type=image&size=YOURSIZE'); foreach ( $images as $image ) { ?> ...
0
votes
1answer
208 views

How do I update_post_meta() or add_post_meta() with an AJAX call

I have a CPT called albums. The CPT have some custom fields, I want those fields to be blank in the post editor, so the person who is editing a post can ad a track to the album from the editor and ...
1
vote
1answer
82 views

Posting to admin-ajax from front end. Is this redirect ok?

I'm posting a form to admin-ajax and the redirect use to be within the success handler. That was taking too long to receive from the server then redirect, even though it was only a small json response ...
1
vote
0answers
73 views

Cannot update my options using wp_ajax

I have implemented wp_ajax in on my options page but the value of my options are not getting saved or updated. Here is my form: public function email_settings_form(){ // Set class property ...
0
votes
1answer
258 views

Passing form data via AJAX to REST API And displaying results

I'm new to WordPress but have been programming PHP for a long time... I searched a bunch of questions but couldn't find what I need. I have a page with a search form that contains a few parameters ...
0
votes
1answer
74 views

Loading post template that contains a nested loop with ajax

I'm currently working on a project where I'm loading a post with ajax. I'm using get_post() to get the post, setup_postdata() to setup the post data, and get_template_part() to load the template ...
0
votes
1answer
506 views

Can't load search results with ajax

I'm trying to load search results on my page without reloading. I tried multiple approaches already, but I still can't make it work, despite using someone else's confirmed solution. Please find the ...
0
votes
0answers
311 views

Category filter with load more ajax

What I am trying to do is to do an Ajax request to filter posts on category click depending on the category id, then apply load more posts by ajax. Problem: when I fire the ajax call by clicking on ...
0
votes
1answer
150 views

Allow user to Upload image and manipulate it on the frontend

The site I am working on allows users to post things up for sale. In the form for creating their post, there is a simple file upload field. The problem is that sometimes when users upload images they ...
0
votes
0answers
38 views

Is there a hack for using is_page() within the function.php file?

I've created a function in my functions.php that's called when the submit_form event is fired on the front-end. Here is the code: add_action( "wp_ajax_nopriv_submit_form", "submit_my_form" ); ...
0
votes
0answers
160 views

How to create a wordpress search with ajax with Relevanssi - A Better Search plugin [closed]

I am using Plugin Relevanssi - A Better Search for search with only words and phrases not only letters matching.And now need to change the search and create it with ajax but didnt know where to start, ...
0
votes
0answers
851 views

Woocommerce ajax checkout submit

So, in woocommerce, when a product is purchased, the user is redirected to "review-order" page. I am tying to make it so that the "review-order" page is instead shown by ajax on the product page ...
0
votes
0answers
60 views

ajax returns -1 in multisite sub domain

i am using the same theme for 2 language site - i didnt use a plugin but rather created a multisite (i like it better) - but... i have a problem with ajax which seems to work for main site but not ...
0
votes
0answers
61 views

Weird admin-ajax.php problem

In my site, each request on the home page is also making a POST to wp-admin/admin-ajax.php. 10.30.4.122 - - [21/Aug/2015:06:07:53 -0400] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 275 ...
1
vote
0answers
118 views

template_redirect or admin-ajax.php?

My plugin needs to be reachable by the public and accept query vars. When called, it will run some backend db tasks, call a 3rd party API and sometimes redirect. Previously, I was using ...
0
votes
1answer
54 views

First time doing Ajax with WP, how to do it?

I have been trying to work this out from various posts over the years but just can't seem to get it to work as I am not a Jquery guru and I am struggling to get my head around it. My html: ...
0
votes
0answers
57 views

Loading ajax does not run through filter the_content

I have created a quiz page with a list of question. I use ajax to load the question content into the quiz. However, only the first question which loaded directly (not through ajax) render correctly. ...
0
votes
1answer
161 views

Can't pass the variable from a select to PHP query

I'm trying to make a dependent drop down with AJAX. I managed to get the chosen variable but I can't pass it to the PHP. Here's my code: action.js window.onload = function($) { ...
0
votes
0answers
36 views

To get the data from the Database is not working?

The below code is reponsible to display a dropdown options that while selected a options a google map was appeared. But when I put the shortcode into my page the options are being shown. But the ...
0
votes
0answers
113 views

[jQuery]Autocomplete and $.post

I managed to solve it using Sisir's push in the right direction. Here's the javascript function: function render_edu_hook_javascript() { ?> <script type="text/javascript"> var ...