Created
October 24, 2016 18:50
-
-
Save kaweski/51b56933dcee2a9e0bbae3b56cf2c2f9 to your computer and use it in GitHub Desktop.
Verifica se a página atual é filha de alguma outra
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*================================================== | |
= Verifica se é página filha = | |
==================================================*/ | |
function is_child($pageID) { | |
global $post; | |
if( is_page() && ($post->post_parent==$pageID) ) | |
return true; | |
else | |
return false; | |
} | |
/*===== End of Verifica se é página filha ======*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment