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

How do I send an ajax request and get a response back from a function?

I've built a function within a plugin. I'd like to call it with an jQuery ajax function. The function is defined as follows: add_action( 'wp_ajax_my_test_ajax', 'my_test_ajax' ); add_action( '...
1
vote
2answers
96 views

Trigger JS in custom meta box if a featured image is loaded/exists

Playing with WordPress customization I created a meta box with several others that report back details of the post. One meta box evaluates the featured image but I am having trouble figuring out how ...
1
vote
1answer
50 views

Shortcodes not working in an AJAX call

I am using AJAX to load next set of posts on homepage. The posts load fine but the shortcodes are not rendered. I am trying to use the do_shortcode function on the content the ajax call fetches (...
0
votes
0answers
44 views

Issue with AJAX passing values from jQuery to PHP

I made an AJAX form in WordPress by making a plugin. The script runs well: First I retrieve the value from the form, then I send it into post_meta table, and finally I put the value in the div I want ...
0
votes
0answers
63 views

Can't get to work with Ajax and Modal Bootstrap

I'm working on a website that shows a list of products, and when each product is clicked a Modal window should appear, with some product info. So I have 3 files: main, header-main and product-info. I ...
4
votes
0answers
49 views

Calling shortcode in wp_localize_script strips result

I am working on adding some functionality on a Wordpress plugin which after a certain click needs to call on some shortcode through ajax. What I first attempted was to call the shortcode inside of ...
0
votes
1answer
53 views

Problem with AJAX in wordpress plugin

I'm writing a plugin and trying to get some data from the database and post it using AJAX. After sending the AJAX request, PHP processes the data and is trying to give me some page data, but it doesn'...
0
votes
1answer
27 views

After ajax image is outside the `<a>` tag

I am loading some content via AJAX, and basically I have this line: $storage .= '<a href='.get_permalink($id).'><img src="'.$image['url'].'" /></a>'; Which gets rendered as: <...
0
votes
1answer
56 views

wp_update_post onclick button using ajax

I'm trying to update my specific page using button in custom page on admin menu. I've tried using ajax to execute function in updatepost.php but the content of page no change. can any one help me? ...
2
votes
1answer
21 views

How to create popup same as wordpress popup feature

I wants to include a popup window which is same like wordpress popup. Like if we click on the wordpress editor's link button it will open a popup window. I wants to create same like that.
1
vote
1answer
116 views

Load a page into a div with Ajax

I'm really a noob when it comes to Wordpress, right now I'm working on a theme that basically is all static, if you want to edit something you'll have to edit the .php file than rather doing it on the ...
1
vote
2answers
72 views

Shortcodes not resolved in AJAX call response

I have a simple function, which returns the content of a page with the given pageID: function get_page_content(){ $id = $_REQUEST['id']; $page_data = get_page($id); echo ...
0
votes
0answers
42 views

How do I get a dynamic shortcode to render correctly?

I have a page that loads album preview images from Flickr. I want the user to click on a link/thumbnail and refresh the contents of the page with the requested album. I want to use a plugin called ...
0
votes
0answers
33 views

Worpdress admin ajax always returns 0

I have a wordpress setup on two folder : main folder / preprod folder on site prod i have wordpress install for production, and on preprod another installation for dev, preprod folder is a ...
0
votes
0answers
15 views

Can't get post meta from custom post type metabox

I use Ajax Load More - Infinite Scroll plugin for output custom post type. I have custom meta box link_to with value /something - it's just link. In template of plugin i try to get it <a href=...
0
votes
2answers
30 views

Email Exists ERROR into Ajax registration form

My problem is that I can't verify if some user insert an existing email into AJAX registration form. However my form is working fine, it's registering users and it's giving all other errors, like "...
0
votes
3answers
52 views

Ajax Load more CPT via shortcode

I have a problem with ajax load more for my CustomPostType. I think i have mistake but don't know where. If it possible to edit my code, i will happy. UPDATE I have create div cool to paste in it ...
0
votes
0answers
31 views

Ajax Login and Register - Display Errors Properly

I've this problem, I got an AJAX registration/login for a better user experience. Now everything is working fine except for display my login/register errors. My json returns [object Object] but I don'...
0
votes
1answer
47 views

Looking for a better way to handle an ajax script that pulls in post data on click

I've developed a template page that displays a grid of "employees" (a custom post type). That part works fine, but I also needed to set up a lightbox to display additional details on click. To avoid ...
0
votes
0answers
17 views

Widget save brake jQuery [duplicate]

I have created a plugin that creates a widget. On the widget form i am using jquery functions that i load using wp_enqueue_script. When adding the widget on a sidebar, everything works. Then when i ...
7
votes
1answer
98 views

Development of a Wordpress Search Plugin - Best Practices

Searching for around two days to find an answer to my question, I finally registered for this StackExchange. :) My Question is not simple, so I need to start at the very beginning. But to give you an ...
0
votes
1answer
43 views

Apply filters when loading post via ajax

Have been trying to solve this for couple of hours already. Here's the case: I'm making a plugin that separates the posts into pages using the <!--nextpage--> tag. It works fine but I want to ...
2
votes
0answers
48 views

How to load paginated post pages via ajax

Here's the case I got: I've setup post pagination for my website and everything works well. Except one thing - on every new page request all the resources are loaded again. This makes the website ...
0
votes
0answers
22 views

Multi-step Frontend Filtering to Reveal Content

I'm not even really sure the best and easiest way to go about doing this - or what the right verbiage is to properly describe what I'm wanting to do. On my site I'm looking to change this selection ...
0
votes
1answer
23 views

Help to upload post attachments from Ajax

My problem is that I cannot upload post attachments from a frontend form. I send data through AJAX to my php files containing functions. Let me be clear: everything is working great, the post is ...
4
votes
1answer
215 views

Retrieve POST data from AJAX call

I have the following JS script : jQuery('#form-recherche').submit(ajaxSubmit); function ajaxSubmit(){ var newFormRecherche = jQuery(this).serialize(); jQuery.ajax({ ...
1
vote
3answers
106 views

AJAX call returns 0

In spite of many similar posts, all the proposed solutions didn't work for me, so here we are. I have the following script : jQuery('#term').keyup(ajaxChange); function ajaxChange(){ ...
-4
votes
1answer
52 views

Widget won't work due to old JavaScript? Any ideas how to make it work? [closed]

I was trying to add this widget to my blog <!--BEGIN PROFILE WIDGET--> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript">&...
0
votes
0answers
64 views

Not getting any response from AJAX when formdata is used

I am new to the forum. I am facing a problem submitting file uploads through ajax. After doing some research, I found that using formdata is an option.However, I am not getting any response from ...
0
votes
0answers
16 views

Rating from a mobile app

I am looking for a way to allow my users to submit post ratings from my native mobile app. I have found this plugin : https://github.com/lesterchan/wp-postratings The calls are made by ajax to : ...
1
vote
1answer
47 views

WordPress Ajax Not Working ( Custom Admin page)

I tried to do a small thing using Ajax. I just try to replace a div. This is what I have done so far. I created a admin menu using add_menu_page. Then I add a form to that page with a text field. ...
0
votes
0answers
34 views

How can I set cookies on both secure and non-secure origins at the same time?

I have a front-end login process via admin-ajax.php. It's a standard user/pass form so I submit the POST request to a secure, https, endpoint regardless of whether the user is currently on a secure ...
1
vote
0answers
18 views

Nonce fails on ajax save

I have made options page with 2 forms and two separate nonce fields, and other input fields that I save with AJAX. The issue is that every time I save and call my function to save options via AJAX I ...
0
votes
1answer
64 views

Setting value of session with Ajax not working

I´m kind of new to using Ajax but I am trying to update the value of a session using Ajax. The Ajax call shoud fires when clicked on a button. When I click on this button it also returns the succes ...
1
vote
0answers
66 views

Frontend Post with JQuery AJAX to Php Issue

My problem is the following. I'm trying to make users publish custom post_type by frontend through a form like this: <form id="msform" enctype="multipart/form-data"> <fieldset id="...
0
votes
0answers
52 views

Reload specific divs after login

My problem is the following. I've a form which I want my guests users to fill out before completingit. So before the last step I place a sliding down jquery/ajax form for login/register to show the "...
2
votes
0answers
37 views

How to implement secure frontend image upload? [closed]

I would like to implement an public image upload in my Wordpress Theme with ajax. What's the secure way to do this? I have read many about security problems when allow users to upload files to the ...
0
votes
1answer
52 views

Load next post by ID on a single page

I hope this topic is not duplicated. I see some similar topics but non of them can solve my problem, so I decided to put a new one. Here's the case. I have a single.php post with the defualt ...
0
votes
1answer
145 views

Wordpress File handle - fopen, fwrite not working with $.ajax or $.post Jquery

I am making some log for all the action done in the site that can be store in a .txt file. my php code in working fine when doing a normal load, but when i use ajax it seems like i doesn't read the ...
0
votes
1answer
24 views

Interim-Login form on frontend

I have a few pages on the frontend of my site in which my users author content. This content can take many hours to create. Unfortunately, my site has a 4-hour session limit, and by the time my users ...
0
votes
0answers
24 views

register_nav_menu & add_action & in AJAX callback

Is it possible to call add_action or register_nav_menu in AJAX callback? I.e. add_action('wp_ajax_some_ajax_action','ajax_callback'); function ajax_callback(){ register_nav_menu('some-location','...
0
votes
0answers
92 views

Dynamic Multiple Taxonomy & Ajax Filtering

I am dynamically generating some taxonomies and then using the terms to create checkboxes on the frontend. I would like to filter posts depending on what is checked. If multiple checkboxes are ...
0
votes
1answer
140 views

Using AJAX in FrontEnd with Wordpress Plugin Boilerplate (wppb.io)

I'm trying to do a tag box similar to that of the backend, but for the frontend. I'm using AJAX to get tag suggestions as the user types in the input field. I've used AJAX in Wordpress in the past ...
1
vote
1answer
134 views

AJAX success response is not working but it's saving my changes

I'm a beginner in jQuery-Ajax so please bear with me. My Ajax response does not seem to load but my changes are being saved. but gives me this error on admin-ajax.php "call_user_func() expects ...
0
votes
0answers
28 views

List author comments with Ajax

I have an author.php template to show author's posts, comments and contact details. I use this function for to show author's comments: function profile_comments() { $curauth = (get_query_var('...
0
votes
0answers
60 views

load custom posts on select option,( wp_query doesn't work for more than 1 object)

I'm trying to load custom posts defined on select form. I registered post type called 'brands', and taxonomy called 'brands_category'. I created a function in functions.php //search for brands ...
1
vote
0answers
191 views

woocommerce in check out page how change the tax rate with ajax an php [closed]

Hi can anyone please tell if possible change the tax rate in woocommerce plugin in chekcout page i want to change the rate tax 0% or 19% when user select option if personal(19 %) if company (0 %) ...
0
votes
2answers
96 views

Fetching $_POST from Page Template into functions.php

I'm having an issue with the order WordPress is loading page templates and functions.php. I have front-page.php which has $_POST['sort-by'] allowing users to sort posts using a drop-down menu. It's ...
0
votes
1answer
31 views

How to get setting from separate file?

I writing a wordpress plugin, that connects to external database and fetch data. Also it create custom button for vitual editor. By clicking this button modal window has been opened, and after that I ...
0
votes
0answers
58 views

Native Wordpress Video Shortcode Not Working After Post is Loaded via Ajax

I'm loading post content into a modal via ajax. Some of the post have video that is added via the wordpress native video shortcode. The video shows up in the post, but none of the mediaElement.js mark-...