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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

javascript - Backbone.js getting target attribute -

html - Repeat image to extend header to fill screen -