K
K
Konstantin Teploukhov2018-02-28 05:38:45
WordPress
Konstantin Teploukhov, 2018-02-28 05:38:45

How to find out if a child page?

hello how do i do something like this

if(Дочерняя страница)
{
 тут уже мой код
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alvvi, 2018-02-28
@blood-moon

global $post; 
if( is_page() && $post->post_parent !== 0 )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question