WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#14879 closed feature request (duplicate)

Introduce is_child()

Reported by: McGurk Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Themes Keywords:
Focuses: Cc:
PR Number:

Description

I've been thinking of a new conditional tag named is_child() which will function in the same way as is_page() but it will tell the user if the current page is a child of the parent page specified as a argument, either by a ID, slug or a title. This could of course be a single value or an array.

I think that many would like and find a function like this useful, I know that I would and it would be perfect when developing a CMS using Wordpress and you need to add something to all child pages.

Change History (1)

#1 @nacin
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.