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
3answers
1k views

WooCommerce: Translation lost on AJAX call in Checkout page [closed]

I'm using WooCommerce for a site that I'm currently working on. And I'm creating it for a language other than English. I do the translations by means of the .po file. The issue that I'm encountering ...
0
votes
0answers
251 views

How to handle cookies from a WordPress plugin on a cached page?

I'm attempting to write a plugin that can work with cookies on a WordPress site that uses page caching (why?). I've been following this tutorial on Esanctuary.net. I'm trying to write to the ...
0
votes
0answers
159 views

Ajaxify comments and insert new submit

I tried to ajaxify my comments system on wordpress. But I have some difficulties to understand what is the right way to insert the comment submitted. In fact, I'm asking if there is a way or a ...
0
votes
0answers
64 views

Ajax Auto Complete Convert All Plural Text To Singular

I am trying to create a wordpress search plugin that if you enter a text or keyword term, it would automatically convert any plural text to singular text e.g. "dogs" will become "dog" I am already ...
0
votes
0answers
137 views

How to Insert Popup box shortcode in wordpress

I create a Tinymce Popup box for inserting shortcode on content area in wordpress. When I click shortcode button then popup box open successfully with input field. But when I click popup box insert ...
0
votes
0answers
48 views

Plugin constructor called multiple times

I have plugin with the following structure - class emailPlg { static $tableName; static $pluginDbVersion = 1.0; function __construct() { global $wpdb; ...
0
votes
0answers
73 views

Get fatal error when using wpdb in jQuery.post target URL

Why am I getting a Fatal error whenever I use wpdb in the target URL of my jQuery.post? Here is my code so far. My process.php is this: <?php $to = 'myemail@gmail.com'; $subject = ...
0
votes
0answers
59 views

Hyperlink to execute PHP

Below is code that will add a column called Printed to Gravity Forms and display a green or red dot representing if the form has been printed. If the form has not been printed, I am trying to a) ...
0
votes
2answers
256 views

Loading by Ajax a plugin that also uses Ajax

I'm having problems with some "contact form" plugins whose use Ajax. The problem is that I use Ajax to call the plugin. Then the plugin is loaded, but when I try to submit the form, I'm redirected to ...
0
votes
0answers
76 views

Perform database function in target URL using jQuery.post

I have a popup which gets the users input (name and email) and sends it to a process.php so I can send an email. I pretty much have that done. But I need to add a functionality wherein it will also ...
0
votes
1answer
31 views

Loading a sidebar on an Ajax call

I wanted to load a custom sidebar when doing an Ajax call, so I found the way with: add_filter( 'loop_start', 'my_sidebar_widget', 25 ); but it is showing the sidebar even in media admin panel, so ...
0
votes
0answers
318 views

Can't get query string in ajax call

I'm developing a plugin that exports to a PDF your current posts view in the admin panel. Suppose you're in a post type "product", then the url must be: edit.php?post_type=product. What I want is to ...
0
votes
1answer
17 views

How to get site homepage from plugin?

I am creating a plugin that has a preview, kind of like the theme customizer preview. It displays the users site in an Iframe. The issue is that I can't seem to be able to get the users homepage using ...
0
votes
0answers
3k views

AJAX with Selectbox Plugins (Select2, Chosen, Selectize)

I have been searching all over the internet for tutorials on implementing AJAX actions from jQuery selectbox plugins such as Select2 , Selectize and Chosen. (these plugins look better than the inbuilt ...
0
votes
0answers
99 views

How to load comment form with AJAX?

We have a Wordpress website with a large number of logged in users. Hence, we cache as much as possible, which includes post pages. We've setup our website so that that the page is mainly dynamic, so ...
2
votes
1answer
667 views

Refine/Filter WP_Query Posts with jQuery or Ajax

I know this has been asked many many times, but I literally searched for an answer for more than 5 hours without finding anything that drives me in the right direction. What I'm trying to achieve is ...
0
votes
0answers
142 views

Contact Form loaded with Ajax

I'm loading Contact Form plugin with an Ajax request. It is correctly loaded, but when trying to submit the form, I get a blank page with a 0 as unique response. I'm guessing it has something to do ...
1
vote
0answers
275 views

do_shortcode via ajax

I try to call contact-form-7 via ajax with do_shortcode. But it shows just "shortcode code". function example_ajax_request() { // The $_REQUEST contains all the data sent via ajax if ( ...
0
votes
1answer
328 views

Add item to media library from blob or dataUrl

I'm trying to build a webcam snapshot recorder. It should take a picture and upload it to the WP media library via ajax / async-upload. Already managed to add a view to the media library. Recording ...
0
votes
0answers
82 views

admin-ajax.php nulls all php variables

I have a problem in a custom function. The function which adds to the WHERE clause in Store Locator Pro works correctly on its own, but I only want it to only work on a certain page, not on all my ...
1
vote
0answers
109 views

image.php content pulled with AJAX [closed]

I made a custom gallery set on my single-page theme where it lists the titles of the gallery post type, and when clicked, the thumbnails are ajaxed below. Then, I made another ajax to watch the ...
2
votes
2answers
401 views

Elegantly using JavaScript on widget admin forms

I'm working on a project involving a lot of widgets, and I'm thinking it'd be really great to have a "More options" section built using jQuery UI Accordion that expands when clicked. So, I've ...
0
votes
0answers
196 views

Pass jquery var to a function in functions.php

I have this js in /js/functions.js: jQuery(document).ready( function($){ //Some event will trigger the ajax call, you can push whatever data to the server, simply passing it to the "data" ...
0
votes
1answer
110 views

Execute Jquery when a specific page in my plugin is loading

I am building a plugin and I would like to be able to hide the wordpress admin side menu and top bar when a specific page is shown(or menu item clicked)? Should I call the jquery directly as a ...
1
vote
1answer
185 views

Function call via ajax – can't figure it out?

In my header.php file I've got … <script type="text/javascript"> var ajaxurl = "<?php echo admin_url( 'admin-ajax.php', 'relative' );?>"; </script> In my functions.php file ...
0
votes
1answer
470 views

Call ajax on the frontend

In my plugin folder I have two file 1. hello-ajax.php 2. myajax.js and by shortcode I add this form on frontend <form id="theForm" method="post"> <input id="name" name="name" value = ...
1
vote
0answers
40 views

Wordpress P2 live problem

Everything worked perfectly in localhost. When I uploaded everything online, the ajax submission seems to not working. It's refreshing the page for comments and live updated is not working I have ...
0
votes
1answer
120 views

How to render the single post template with the post name?

I'm calling pages with Ajax and I have this code in functions.php to determine which page is called and then, render the corresponding template: function ajax_callback() { if( isset( ...
0
votes
2answers
128 views

Dynamic Gallery

I'm building a single page website and that means that all the links need to call for post content dynamically. I found this tutorial and with the help from some folks from StackOverflow I managed to ...
0
votes
2answers
584 views

Display ajax preloader for large images within posts

Our WordPress installation runs only images within posts. Generally medium, lightweight images but we are also publishing larger images, sometimes gif animations which take enormous time to load. ...
0
votes
1answer
5k views

Load page content with AJAX using Fancybox?

I can find a lot of tutorials about how to load pages dynamically in WordPress and even page contents, like this: how-to-load-just-the-content-of-a-wordpress-post-using-ajax and Best way to load ...
1
vote
1answer
132 views

Wordpress Plugin Page is Loading in Admin Content Container Instead of Separate Page

I am creating a wordpress plugin that has it's own UI. It looks like a standard web application, so everything that is done within the plugin is handled in this UI instead of integrating it with the ...
0
votes
1answer
223 views

How to load a plugin when doing an Ajax call? [duplicate]

I have posted this question: How to use shortcodes on a widget sidebar when doing an ajax call?, with no answers. Now I want to ask a more specific question. The problem seems to be that the ...
0
votes
0answers
230 views

Loading individual category post via dynamic tabs

I've been searching for a navigation solution for my wordpress site's front page that loads individual categories and their corresponding post through dynamic tabs. These are tabs or buttons that load ...
0
votes
0answers
127 views

How to use shortcodes on a widget sidebar when doing an ajax call?

I'm trying to use a shortcode from Promotion Slider Plugin inside a widget when doing an ajax call. As said here, I could achieve it doing: add_action( 'init', function() { ...
-1
votes
1answer
49 views

AJAX: Wordpress filters inside $html do not work as intended

I am sending HTML content through some AJAX magic and while everything is working as I wish, the output gives something along those lines in the page: "http://permalink.comtitle" It's as if all the ...
0
votes
1answer
171 views

jQuery form plugin, submit in the wordpress way

Trying to use jQuery form plugin in wordpress site to upload files. HTML markup: <form id="myForm" action="process.php" method="POST" enctype="multipart/form-data"> <input type="file" ...
0
votes
0answers
264 views

How to use AJAX to check if user is still logged-in?

I am working with Wordpress 3.8 I have an app that I would like to use AJAX to check with Wordpress to determine if their idle time has expired. In my functions.php, I have the following hook that ...
1
vote
1answer
159 views

Help with AJAX front end comment moderation

I am implementing a front end AJAX comment moderation system for a site I manage but I am having a hard time getting it to work. Right now clicking on the link that approves the comment runs the ...
0
votes
1answer
435 views

Next Ajax call doesn't work

I'm submitting a form via Ajax: <form id="ajax-form-next" method="post" action=""> <input type="hidden" name="nextPosts" id="nextPosts" value="<?php echo $postIDs; ?>"/> ...
0
votes
2answers
565 views

Stop loading more posts if none left AJAX

I'm using the following JavaScript to load more pages in #work_items (see live at http://mtthwbsh.com): jQuery(document).ready(function($){ $('.older a').live('click', function(e) { ...
-1
votes
1answer
65 views

A refreshless WordPress website

As I said in my previous post, I am totally new in the WordPress world. My knowledge of PHP, Css, HTML and JavaScript is a little old but I am sure I can do this by my own with some guidance. Please ...
0
votes
0answers
75 views

Hook ajax function to child class

I have three different classes, the main one, the back-end class and a front-end class. The front-end class should handle the ajax request, so I was planning on placing the ajax code inside that ...
-2
votes
1answer
70 views

Send button using own contact form [closed]

I have an own contact template here , und built it according to this info. The submit button does not work because another event seems to block the reload of page. Looking in the console, I see an ...
0
votes
0answers
16 views

How to use ajax_url in front end when using with theme? [duplicate]

I'm trying to use ajax function to my theme. I think i can't just put the javascript code in my functions.php, i have to register it properly and enqueue it. So i store the javascript file with .js ...
0
votes
2answers
254 views

WP_LOCALIZE_SCRIPT doesn't work

I am creating AJAX loading and need to use WP_LOCALIZE_SCRIPT but cannot make it work. Here is my code. I place it in functions.php wp_enqueue_script( 'page_data'); $gallery_js_data_array = array( ...
2
votes
2answers
543 views

Wordpress Ajax Getting Response “Null”

I am trying to get ID of post on HOME page .So far my coding is wp_enqueue_script( 'my-ajax-request', get_stylesheet_directory_uri() . '/js/ajax.js', array( 'jquery' ) ); wp_localize_script( ...
0
votes
1answer
1k views

Insert Post using Ajax

I'm using the following code to submit a form from a Wordpress page. <script type="text/javascript"> $j=jQuery.noConflict(); $j(document).ready(function(){ ...
0
votes
0answers
62 views

Ajax Not Working If The Handler is Located Outside Plugin Submenu Page Function

I am using wordpress ajax to trigger a submission. I located the submission code in the submenu page, because of it is have conflict with the function in plugin main page. The problem here is, I ...
0
votes
0answers
206 views

Custom URL structure with external web service

I have WordPress site which displays content from database, but I also want to consume .NET web service hosted on the Windows Azure and fit the content inside the WordPress. URL structure of ...