Include external pages in WordPress navigation

January 28, 2009 · Print This Article

Imagine that you’re running a blog, but also have an online shop, a forum and some static pages. Do you’d like to be able to include theses pages in WordPress navigation?

If yes, just read on.

The solution to this problem is fairly simple.

As the wp_list_pages() function returns only <li>…</li> elements, we just have to add static links to our external pages, just as shown below:

<?php wp_list_pages('title_li='); ?>
<li><a href="forum.php">Forum</a></li>
<li><a href="shop.php">Shop</li></a>

That’s all. These two external links looks exactly the same as the ones from WordPress.

Your choice for site templates and wordpress themes


Got something to say?

You must be logged in to post a comment.