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.

Author: Ryan Kessen

Computer Repair, Freelancer, Blogger, Reviewer and all around nice guy!

Leave a Reply

Your email address will not be published. Required fields are marked *