Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to hide some fields in the admin, i.e. the editor, if the page is a parent (top-level) but not hide it if it's a child, and show other fields if it's a grandchild page.

Anyone have any idea if there's code to check through a function if the current page in the admin is parent / has child?

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.