WordPress List Pages

On previous post, I edited the header.php for including horizontal menu on listing main pages on this site. The code is as below:

Now, I want it to be dynamically list all the main pages on this site in horizontal menu. The way to do is using wp_list_pages(); template tag. With this, I don't have to manual edit the code if new page is added. Below are the new replacement code in header.php.

Related Posts

References

NextGEN Gallery Album Settings - New Page

Today I decide to have a new page for each gallery in the album. It will be more user friendly. In order to do this, I have to make sure Deactivate gallery Page link is disable (unchecked) in Gallery > Options > Gallery > Gallery Settings section. Then I need to add title, title description and preview image on each gallery. It will create a new page for this gallery by clicking Add page button. Page Link to will show the page that just newly create.

Read more...

Where to Edit Theme Template File?

The easiest way is through site administration panel. Here are the steps below:

  • Log in to WordPress using admin account.
  • Go to Design > Theme Editor section.
  • Choose the theme template file (on your right) that you want to edit and then click it.
  • After finish editing, click Update File button.
  • Log out from WordPress.