[wp-trac] [WordPress Trac] #34428: New function `has_archive_post_type()`

WordPress Trac noreply at wordpress.org
Sat Oct 24 07:52:54 UTC 2015


#34428: New function `has_archive_post_type()`
-------------------------------+-----------------------------
 Reporter:  sebastian.pisula   |      Owner:
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 Function will be check that custom post type has archive. For example:


 {{{
 <?php if(has_archive_post_type('cpt')) : ?>
 <a href="<?php echo get_post_type_archive_link('cpt');?>">My Special
 Archive Link</a>
 <?php endif;?>
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34428>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list