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.

7 Comments

  1. I’m facing the following issue
    Warning: require(): https:// wrapper is disabled in the server configuration by allow_url_include=0 in C:xampphtdocswordpressindex.php

  2. Nice post. I was checking continuously this blog and I’m impressed!
    Extremely useful information specifically the
    last part 🙂 I care for such information much. I was looking for this certain information for a long
    time. Thank you and good luck.

Leave a Reply

Your email address will not be published.