I want to thank you Erik Range, the author of this great plugin wich has helped me a lot of times: is_child
Unfortunately the developer’s site (http://erik.range-it.de/) is down. So I’ll host this one for all of you who haven’t used it yet – if Eric is not offended – those lines of code are way too precious to get lost!
What is this for?
Useful for template designers. This plugin checks if current page, posting or category is in direct or recursive relation with a specific parent category or parent page.
Examples:
———————————————————————
Examples:
———————————————————————
–> is_child( 10 )
Checks if the current page, posting or category is somehow
related to category- (or page-)ID 10.
–> is_child( “Example Category”, false )
Checks just if the current element is a direct child of “Example
Category”.
–> is_child( “some-page”, 1 )
Checks if the current element (page) is somehow related to a page
with the slug “some-page”.
Thanks man but this version is outdate… the latest is 1.1.2
is it available somewhere for download?
it’s still available at Erik Range’s site, allthough the site is down. Google cache ftw
http://erik.range-it.de/downloads/wordpress/plugins/is_child.zip
Thanks Erwin, I’ve updated the post!
Great plugin – very helpful to create conditional sidebar menus for website design. Thanks!!
Hey my name is Erik Range but i´m not the guy from that site!!!
I´m 13!!!
And i live in Germany, Regensburg(sry i don´t now the english name :’-( )
Thanks for the great plug-in. Looks like this is the only one that does this specific task of determining a parent-child relationship.
http://www.schloebe.de/wordpress/is-subpage-of-plugin/
That plug-in ONLY checks for immediate parent so is not useful if are checking from ‘grandchildren’ level.
One small issue though, the site says the version is 1.1.1 but the installed version says 1.1.1 !! is it a typo? or I am doing something wrong ?
Sorry about the previous post, I pressed the ‘Submit’ before making the correction.
“site says the version is 1.1.2 but the installed version says 1.1.1″
Hi Matt, I have an updated version of Is Child on my website to support 2.9.1 and beyond, http://www.visser.com.au/wordpress/plugins/is-child/
thanks for share link to download ” is_child WordPress Plugin ” .
XXX damn genius! still works in WordPress 3.0.5