Done some reasonable searching for this and don't think it's been asked before.

I've got a site which I'm developing a custom template/theme for. The site will use a page as the front page (rather than the list of posts), but I want to create a link in the template to the page of blog posts.

There are some functions for finding various URL's like site_url() and admin_url(), and, of course, there's bloginfo(), but I can see anything that will get me the name/slug/URL/ID of the page used as the blog page.

I'm sure I've seen this somewhere before but can't track it down now that I need it.

Any ideas?

Thanks RW

2 Answers 2

<?php $blog_link = get_page_link( get_option( 'page_for_posts' ) ); ?>

yes there is since 3.0.0

    <?php get_home_url(); ?> 

Your Answer

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

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