Show the same level pages in WordPress
-
I want to show the same level pages if the child does not exist or is in the 1-level children. I tried like this:
if(!empty($post->post_parent)) { $children = get_pages("title_li=&hierarchical=0&child_of=".$post->post_parent."&exclude=".$post->ID.""); } else { //tutaj nie jest nigdy $children = get_pages("title_li=&hierarchical=0&child_of=".$post->ID."&exclude=".$post->ID.""); }
Any help?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Show the same level pages in WordPress’ is closed to new replies.