Skip to main content

Ivan Teoh

Something personal yet public

Remove WordPress List Pages from Sidebar

Since I already created a horizontal menu listing all my main pages, I want to remove the pages list from sidebar. The theme template file that need to edit is sidebar.php. I just need to remove this line, <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?> as shown below:

28-sidebar-before.php (Source)

</li> <?php }?>

<?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>


After removing the line, the sidebar.php will become:

28-sidebar-after.php (Source)

</li> <?php }?>



Comments powered by Disqus