[wp-trac] [WordPress Trac] #20438: Custom Post Types with Post Format support aren't registered against post_format taxonomy

WordPress Trac noreply at wordpress.org
Wed Sep 2 16:15:26 UTC 2015


#20438: Custom Post Types with Post Format support aren't registered against
post_format taxonomy
-------------------------------+----------------------
 Reporter:  batmoo             |       Owner:
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Posts, Post Types  |     Version:  4.1.3
 Severity:  normal             |  Resolution:  wontfix
 Keywords:                     |     Focuses:
-------------------------------+----------------------

Comment (by DrewAPicture):

 Replying to [comment:11 s0what]:
 > adding
 > {{{
 > register_taxonomy_for_object_type( 'post-format', 'page' );
 > }}}
 > doesn't work for me, nor does replacing 'post-format' with 'post-
 formats' or 'post_format' and 'post_formats'.

 @nacin's example in comment:3 had a typo. The slug for the post formats
 taxonomy is `post_format` not `post-format`.

 This should work for you:

 {{{
 #!php
 register_taxonomy_for_object_type( 'post_format', 'page' );
 }}}

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


More information about the wp-trac mailing list