All Questions
Tagged with wp-blog-header.php php
6 questions
1
vote
1
answer
58
views
External WP_Query call from PHP crashed after version update
I have an external script that does some DB maintenance through WP_Query and similar functions. It used to work great, but now after a PHP version update (from 7 to 8) it stopped working.
The ...
2
votes
0
answers
3k
views
Call to undefined function wp() in wp-blog-header.php
I am getting this error:
Fatal error: Uncaught Error: Call to undefined function wp() in /home/pgcimykfka2h/public_html/apni-rasoi.com/wp-blog-header.php:16 Stack trace: #0 /home/pgcimykfka2h/...
0
votes
0
answers
572
views
How to call WordPress PHP file using external js file
I have added custom PHP file in WordPress directory and added following line to use WordPress functions:
require ('../wp-blog-header.php');
Now I am able to use WordPress functions but unable call ...
0
votes
1
answer
468
views
Allow the execution of an external PHP script for logged users
I need to call a PHP script external to WP and I would like to take advantage of the credentials of WP so that only logged users can access this script. I have tried to use this code embedded in my ...
2
votes
1
answer
701
views
there's a way to include a minimal WP for check only the current user, its roles (caps?) and then release/free it?
I need to count how many times a file in a particular sub-directory is downloaded and track who downloaded it.
I'm using a Php file to do it, it isn't a WP file but I need to include WP to get the ...
71
votes
7
answers
110k
views
What is the correct way to use WordPress functions outside WordPress files?
I read about 2 methods for initializing WordPress function outside of WordPress files so We can use these functions on any page or website outside the WordPress blog.
Which one of these 2 methods is ...