[wp-trac] [WordPress Trac] #35306: get_post_type_archive_link() returns false for the "post" post type

WordPress Trac noreply at wordpress.org
Tue Jan 5 07:45:15 UTC 2016


#35306: get_post_type_archive_link() returns false for the "post" post type
-------------------------------+------------------------------
 Reporter:  ericlewis          |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by sebastian.pisula):

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

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


 Replying to [ticket:35306 ericlewis]:
 > It would be nice if this function returned the blog post archive link.
 >
 > Related: #19902

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35306#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list