I Recently installed wordpress as subdomain on my main website. Now i have two installations: www.example.com and www.example.com/store/. Now i want my Main domain to show recent posts from subdomain in the sidebar of main site.
All i want is:
post->url post->title post->thumbnail
getting post url and title was very easy with the following code "
$products = $wpdb->get_results( " SELECT * FROM store_posts WHERE post_status = 'publish' AND post_type = 'post' LIMIT 4" );
My both WordPress installations share the same database but different prefixes and only one image is attached each post (not using featured image function, just attaching image to post)
I don't have much idea for how to join and do custom queries. Kindly help in his regard.