Get wordpress featured image url from another part of my site

I have a Minecraft review website and let my reviewers produce content from this url SITEURL/content/

My website has wordpress installed on SITEURL/content/
I have coded my own site to display WordPress posts on SITEURL
in no way is WordPress installed on the main root directory, only on /content/

Read More

I have been able to grab posts from the WordPress database and get them do display on the website I made http://minecraft-jar.net

Now, I need to (hook in) to WordPress on the /content/ part and grab the featured image url from the post. I can get the ID of the post from a simple MySQL query and the variable is called $postID

Thanks.

Related posts

Leave a Reply

1 comment

  1. If you would like to use WordPress outside of the WordPress framework you simply have to require the WordPress blog header:

    require('path/to/file/wp-blog-header.php');
    

    You may also want to define the themes constant as false:

    define('WP_USE_THEMES', false);
    

    You can find more about integrating from the WordPress codex.

    Anyway, once you have your ID, simply do a get_the_post_thumbnail() and pass the ID as the argument and what size thumbnail you need. Make sure you do this after the require function.