Wrong display subpage on search results
-
Hi everyone!
I have big problem. I use solution from https://codex.www.ads-software.com/Template_Tags/wp_list_pages . I want display subpages when user is on parent page. I use this code:
<?php if($post->post_parent) $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); if ($children) { ?> <ul> <?php echo $children; ?> </ul> <?php } ?>
its works but when i use search and it shows me results but on this page are showing ALL subpages although this subpages shouldn’t show.
help!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Wrong display subpage on search results’ is closed to new replies.