I have a site at the main domain and then a blog at blog.domain.com. Any way to retrieve the latest post from the blog.domain.com and echo it out on the top of my home.php file?

Not really sure where to look, many outdated examples :X

2 Answers 2


Appearance >> Widgets >> Select RSS and enter any blog feed you want.

You can do it using the default rss widget in wordpress. Create a widget box to appear where you want through functions.php file in your theme.

or you can get jNewsticker from Codecanyon and enter the feed from the blog and copy the shortcode where you want it and change the css to match your theme.

  • please let me know if my answer helped Dec 2, 2012 at 14:56

Easiest way to do it now is with the WP REST API. By making a request to the site's API, you can request the most recent post data, then parse the JSON response for display on your site.

If your blog site is up-to-date, make a GET request to https://<your-blog-domain>/wp-json/wp/v2/posts?per_page=1&_embed to get the most recently published post. For example, try https://make.wordpress.org/core/wp-json/wp/v2/posts?per_page=1&_embed to see the latest post from the WP Core dev team.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.