[wp-trac] [WordPress Trac] #47096: get_post_type() in author.php return random post type

WordPress Trac noreply at wordpress.org
Thu May 2 11:23:03 UTC 2019


#47096: get_post_type() in author.php return random post type
-------------------------------+-----------------------------
 Reporter:  wolly              |      Owner:  (none)
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 I have created an author.php page.

 I have a do_action in sidebar

 When I add_action I check if it's a given post type, before adding action.

 But in author.php get_post_type() return a CPT, different on different
 server, maybe it's the last registred.

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


More information about the wp-trac mailing list