• In your template you can use
    <?php echo get_option(‘home’); ?>
    To link to your homepage.

    If have made a template in which i use a static page as front page.

    Now i want to make a link to the blog page in my template (i have chosen a page for the post-page/blog in the backend)

    Is there a function that does that?

Viewing 9 replies - 1 through 9 (of 9 total)
  • http://codex.wordpress.org/wp_list_pages

    the list pages shows a list of pages as links….i believe scanning the page, that you can exclude certain pages, or only include certain pages….maybe that sounds like what you trying to do?

    Thread Starter spaantje

    (@spaantje)

    I already use that one for the menu.

    Thanks, But i don’t think it’s what i’m looking for.
    I can’t look for the page that’s displaying the posts.
    I can just in/exclude page id’s.

    If that’s the only way i can just use a hardcoded url.

    Any other suggestions?

    Guess I’m confused as to what you need? You’ve selected a page that all your posts appear on…..so that page has a page id, so you would include that page….

    sorry if I’m misunderstanding you…..

    Edit: Just read what you mean,@RVoodoo he is looking for something which will pull the link of the blog posts page automatically, so if he changes the page the link will update also.

    Thread Starter spaantje

    (@spaantje)

    That is correct.. But i want the template to be universal so that is still works without knowing the page id..

    ah hah…I follow now, that is something I’m not sure about

    How about bloginfo, depends on what settings you have for your WP URL and blog URL

    Thread Starter spaantje

    (@spaantje)

    That’s not working.
    get_bloginfo(‘url’); Points to the frontpage..
    But i can’t seem to find the posts-page url.

    I landed here looking for the same answer, but found it after digging around in the Codex.

    Try:
    get_page_link(get_option('page_for_posts'))

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Link to blog in template’ is closed to new replies.