Get the blog page URL set in Options

I have set the blog to be a different page other than the home page.

I want to have a link from single.php to this blog page.

Is there any function that pulls out URL for the blog ?

5

As of WordPress 4.5 you can use:

get_post_type_archive_link( 'post' );

This handles the logic of getting the correct URL regardless of whether posts show up on the homepage or in a specified page.

Leave a Comment