Listing daughters of a particular Page

Asked

Viewed 172 times

1

I’m not getting to list the daughters from the menu Institutions that is a Page.

Institutions - Policia Militar - Prefecture - Secretariats

<li><a href="#">Instituições</a>

 <ul>

                <?php wp_list_pages("title_li=&child_of=Instituições&depth=1”); ?>

</ul>

1 answer

1


<li><a href="#">Instituições</a>
            <?php
                $titleslug = 'Instituições';
                $unsanitized_titleslug = str_replace('-',' ',$titleslug);
                $pageinfo = get_page_by_title($unsanitized_titleslug);
            ?>
            <ul>
                <?php wp_list_pages('title_li=&child_of='.$pageinfo->ID);?>
            </ul>
        </li>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.