Support » Fixing WordPress » how to extend conditional function to sub-sub-pages?

  • Hi everyone!

    i want to extend a conditional function tag to sub-sub-pages but i don’t know how (i did before a lot of search but didn’t find nothing). at the moment i have this code that works only at sub-pages:

    `if ( (in_category(’29’))||(is_page(‘2007-premiados’)||$post->post_parent==”14″) ) {
    echo ‘<div id=”submenu”>
    <ul class=”fix”>’;


    echo ‘

    how to increase to sub-sub-pages of post_parent==”14″?


Viewing 2 replies - 1 through 2 (of 2 total)
  • I dont’t know if this is the easiest and/or best way to do it but it worked for me.

    if(is_page('3') || $post->post_parent=="3" || $post->post_parent=="33" || $post->post_parent=="34" || $post->post_parent=="35")

    In this case ID’s 33, 34, & 35 were subpages of 3. 33,34,&35 all had subpages of their own. It applied the execution to all of them and their subpages.

    hi sbarry50,

    yes… for a few subpages that code it works, but when i have more than fifty subpages i need a better solution…

    thanks for the reply!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to extend conditional function to sub-sub-pages?’ is closed to new replies.