Linked Questions

0 votes
0 answers
106 views

admin-ajax.php is slow [duplicate]

On this site, it usually takes around 5-7 seconds for admin-ajax.php to process and return the response for when the user clicks on the plus icon on project hover. I'm not sure if this is a WordPress ...
Desi's user avatar
  • 1,209
9 votes
2 answers
7k views

Use AJAX in shortcode

I have the following code to the shortcode to display a random quote. Question: how to make a button display a new random quote? I mean, that would hit the button and show you a new quote (without ...
user23769's user avatar
5 votes
2 answers
2k views

Creating Ajax backend for Specialised Page Template? Should admin-ajax.php be used?

We're scoping an upcoming project that will require the development of a large php web application within an existing wordpress site - this is for our use only and we've no intention of trying to ...
HeavenCore's user avatar
1 vote
1 answer
7k views

How to speed up admin-ajax.php in wordpress

I have some code on functions.php that I call via ajax on frontend, I'm using admin-ajax which takes about 2 to 2.5 seconds to load since I have many plugins and that ajax handler need to load all wp ...
Islam Mohamed's user avatar
7 votes
1 answer
6k views

Understanding SHORTINIT with Wordpress 5

What I am trying to achieve I am looking at using Wordpress decoupled, and most tutorials and guides go into detail on using the Rest API. Recently, I discovered the SHORTINIT option to load a very ...
Alexander Holsgrove's user avatar
2 votes
2 answers
2k views

Minimal WordPress load for only `get_option` to work (because ajax...)

In a plugin, I use ajax to get_option() which takes much longer than it has to because entire wp gets loaded. How do I set things up so that it (my ajax) loads only what is needed? (get_option())
laggingreflex's user avatar
1 vote
0 answers
5k views

Speeding up admin-ajax.php

I'm currently playing around with AJAX forms, but I've noticed that admin-ajax.php is quite slow. If I simply return the word 'test', it takes around 1400ms. I'm assuming it's because it's loading ...
Chris's user avatar
  • 453
0 votes
1 answer
4k views

Call to a member function get_row() on a non-object, Unable to use global $wbdp inside a plugin

I am building a custom plugin for my WordPress site. I made a php file called "checkrank" that obtains data from a custom table named "cranking". $uid = $GET['id']; function checkExists($id){ ...
ETAN's user avatar
  • 111
1 vote
1 answer
4k views

jQuery UI Autocomplete showing all results

I've built an Autocompleting search box for WordPress categories (it's actually a Custom Taxonomy), which works great (i.e it shows the categories when typed). However, when 1 key is typed, it will ...
Tom Oakley's user avatar
0 votes
2 answers
829 views

Test if php document executed by Wordpress or directly

Active plugin PHP files are interpreted automatically when you view a page, post, admin page, etc. I could also run a plugin PHP directly if I knew the fully qualified URL, however it will most ...
McShaman's user avatar
  • 179
1 vote
0 answers
2k views

how to use shortinit in wordpress

I want to load a minimal resources in Wordpress because the server that I'm working on is very slow. I tried defining short init in the wp-config file: define('SHORTINIT', true); But then I got ...
soul's user avatar
  • 371
2 votes
1 answer
1k views

Adding wp_ajax to a theme outside functions.php (on specific template page)

I'm doing a function which requires the use of the wp_ajax action. I've followed this guide to set it up with the differences of adding the requesting the object AJAX file in functions.php and also ...
WolfieZero's user avatar
0 votes
1 answer
987 views

AJAX – SHORTINIT set to TRUE returns blank

Thought I'd take this nifty shortinit trick for a spin. However, when I include this in my custom ajax handler, I get no response from my callback. If I comment it, it works just fine. Anything ...
INT's user avatar
  • 1,281
0 votes
2 answers
957 views

Connecting to wordpress database in my application [closed]

I am creating a wordpress site that will give accounts to people that want to be contributors/authors of a cause that people can donate too. We will approve/deny causes of approved authors Our ...
onTheInternet's user avatar
0 votes
0 answers
815 views

Ajax take too long to return code

I'm bulding a new web site and I need use ajax to search and return some pages/post. I don't know the problem but my ajax need 2s or 3s to return the HTML structure with the page and some photos (this ...
Marcos's user avatar
  • 187

15 30 50 per page