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">';
wp_list_cats('optioncount=0&child_of=29&orderby=ID');
echo '
</div>';'
how to increase to sub-sub-pages of post_parent=="14"?
thanks!
sbarry50
Member
Posted 1 year ago #
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!