[wp-trac] [WordPress Trac] #15995: query is separating post_type 'post' from custom post_types when retrieving custom field

WordPress Trac wp-trac at lists.automattic.com
Wed Dec 29 19:42:39 UTC 2010

#15995: query is separating post_type 'post' from custom post_types when retrieving
custom field
 Reporter:  bowstreet          |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Post Types         |     Version:  3.0.3
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |

Comment (by bowstreet):

 Yes I reproduced this on three clean installations each of them on a
 different environment/server.

 I made a theme including three files, index.php having three different
 queries, the functions.php which adds a post_type "custom" with a meta_box
 called "sticky" and the necessary style.css.

 Well lets reproduce this step by step. First set up a clean Wordpress,
 make a new folder in your themes folder, upload the three files into the
 new folder.

 Log into backend as admin and add a "Post" with title "AAA" make it sticky
 via "Visibility: Public, Sticky", add another "Post" with title "CCC" make
 it sticky the same way. ''(yes there is already shown the newly added
 meta_box from functions.php causing another bug as I just found out, let's
 do this later)''

 Now go to the "Custom" post_type and add two new pages with the title
 "BBB" and "DDD", make both of them "sticky" with the custom meta_box on
 the right side.

 In the list/overview of "Custom" it will now mark the "BBB" and "DDD"
 pages as "sticky".

 The index.php output now should now be the same as shown in the enclosed

 Try playing around by enabling and disabling the sticky checkbox to see
 what happens with the output queries.

 When checking the "sticky" meta_box in a "post" you will soon get
 scrambled egg.

 Let me know if it's "working fine". I added the theme as a attachment.

Ticket URL: <http://core.trac.wordpress.org/ticket/15995#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list