Make WordPress Core

Opened 17 years ago

Closed 16 years ago

#10350 closed defect (bug) (worksforme)

post_parent returns 0 even when post is revised to give a parent

Reported by: petethebloke's profile petethebloke Owned by:
Milestone: Priority: low
Severity: normal Version: 2.8
Component: General Keywords: reporter-feedback
Focuses: Cc:

Description

I've added <?php echo $post->post_parent; ?> to a page and it shows 0 when on homepage (as expected). It shows 14 when on a subpage of 14, but on a different sub-page of 14 it shows 0. It seems it's getting the original parent before the page was revised to be a subpage of 14.

Change History (3)

#1 @dd32
17 years ago

Does it occur under the default theme with all plugins disabled?

Seems pretty unlikely WordPress would even render the object if the parent was set incorrectly at parsing time.. (but possible)

#2 @Denis-de-Bernardy
17 years ago

  • Keywords reporter-feedback added
  • Milestone changed from Unassigned to 2.9

#3 @ryan
16 years ago

  • Milestone 2.9 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Closing pending feedback.

Note: See TracTickets for help on using tickets.