WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#35306 closed defect (bug) (duplicate)

get_post_type_archive_link() returns false for the "post" post type

Reported by: ericlewis Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Permalinks Keywords:
Focuses: Cc:

Description

It would be nice if this function returned the blog post archive link.

Related: #19902

Change History (2)

#1 in reply to: ↑ description @sebastian.pisula
6 years ago

I think that should be url to "Posts page" if page exists

<?php
if(get_option('page_for_posts')){
     return get_permalink(get_option('page_for_posts'));
}

Replying to ericlewis:

It would be nice if this function returned the blog post archive link.

Related: #19902

#2 @ericlewis
6 years ago

  • Component changed from Posts, Post Types to Permalinks
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #19902.

Note: See TracTickets for help on using tickets.