Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted
<?php $blog_link = get_page_link( get_option( 'page_for_posts' ) ); ?>
share|improve this answer
add comment

yes there is since 3.0.0

    <?php get_home_url(); ?> 
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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