I currently have a Wordpress website and have a page in the site that is not Wordpress. I have an admin menu on this page that connects back to mysql and I have a plugin installed on Wordpress that I would like to be accessed inside of this non wordpress page. They both use the same sql database. The page that is not a wordpress page is html, php. I am just wondering how I can do this. Thank you.
Asked
Active
Viewed 43 times
1
-
You have to include wp-load.php file on php page. Some thing is shown here https://stackoverflow.com/questions/5306612/using-wpdb-in-standalone-script – milan kyada Aug 02 '17 at 16:22
-
Is the "adding WordPress menu items to a non WordPress page" related to "accessing the WordPress plugin from a non WordPress page"? Do you know about AJAX and WordPress? – Aug 03 '17 at 19:07
-
I do not know about AJAX and Wordpress. Also, I would say that it could be related to accessing the Wordpress plugin from a non Wordpress page. – Emily Sanner Aug 05 '17 at 17:46
-
I still don't quite understand exactly what you are trying to do but you can run the plugin code using an AJAX request from a non WordPress page. This is much, much easier than the approach suggested by milan kyada since the WordPress AJAX handler will load the WordPress core for you. – Aug 06 '17 at 10:51