Hey there! any question in your mind? Ask It Now!.

Popular Categories





From a different PHP file trying to access the currently logged in user in wordpress.

+3 votes
255 views
asked in Programming by mannu (990 points)

I am trying to get all logged in wordpress users of my site, For this i have hosted a php file in same wordpress folder,

I know about get_currentuserinfo but its for wordpress i mean i want this information in that separate php page and it should not be delivered from Wordpress.

I hope you got my problem and also hope you will help me out.

Thanks!

1 Answer

+1 vote
answered by vicky (390 points)

If you have hosted that php file in same folder of wordpress,you just need to include  this code on php file.

 

<?php

    define('WP_USE_THEMES', false);

    require('wp-blog-header.php');

?>

This will help you out.

Related Questions

+5 votes
1 answer 224 views
+1 vote
1 answer 198 views
+2 votes
1 answer 171 views
+8 votes
2 answers 315 views
+6 votes
2 answers 1,637 views
+4 votes
1 answer 653 views
+4 votes
5 answers 756 views
+8 votes
3 answers 182 views
+2 votes
1 answer 125 views
asked in Programming by krish Expert (6,310 points)

Not a Member yet?

Ask to Folks Login

My Account
510 Folks are online
1 members and 509 guest online
Your feedback is highly appreciated