How to list page or category links in WordPress

These simple peices of code will allow you to display page or category links in your WordPress theme.

To list pages use the following code:

You can exclude specific pages by changing the above code to the following:

Just replace 1 with the ID of the page and add a coma to list more than one.

To list categories use the following code:

You can exclude specific categories by changing the above code to the following:

Just replace 1 with the ID of the category and add a coma to list more than one.

Date: May 08, 2013

Filed Under: Web Development

About the Author: Computer Repair, Freelancer, Blogger, Reviewer and all around nice guy!

Leave a Reply




Google PageRank