php - Dynamic wordpress sidebar -
i trying implement sidebar in wordpress website, static want dynamic. want page check 'on page load' whether particular page has sub-pages or not. if yes should display sidebar on right showing sub pages under current page.
i can implement in normal php not know how go in wordpress. new wordpress not know how go this.
this sidebar want display:
<div class="sidebar"> <h2>in section</h2> <ul> <li style="list-style:none"><h3><a href="#">sub page 1</a></h3></li> <li style="list-style:none"><h3><a href="#">sub page 2</a></h3></li> <li style="list-style:none"><h3><a href="#">sub page 3</a></h3></li> </ul> <br /> </div>
the function looking wp_list_pages.
the page has whole section on listing sub pages.
Comments
Post a Comment