How to display posts outside of WordPress

WordPress is built upon a collection of powerful core APIs. You can actually load the core APIs into any PHP application, just like any other library. It is quite simple to do, you need to include the file wp-load.php where ever you want to include the WP core API.

Assuming your blog is located in /user/var/www/html/blog, the single line below loads in WordPress API into your non-wordpress application.

Once the wp-load.php file is loaded into your code, you have access to the WP API. For instance, you can query the database for the recent blog posts, and display them where you did like show on your website.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

Arjun
I am Arjun from Hyderabad (India). I have been working as a software engineer from last 7+ years, and its my passion to learn new things and implement them as a practice. Aside from work, I likes gardening and spending time with pets.
DMCA.com Protection Status