WordPress Check if Category Has Children

Written by on

This bit of code allows you to check to see if the current category archive page has child categories. I needed to check this on a site where until you were viewing a category that has no children, you saw category listing pages and then when the category has no children, you see the listing of posts for that category at the end of the line.

Wordpress Category Menu Integration with wp_list_pages();

Written by on

Here is a bit of code that you can use to put a category dropdown menu that allows for complete customization. I have wanted to put a category drop down menu in the middle of wp_list_pages(); for a while and this does the trick for me. Basically, if you want a navigation structure like this:

About (regular page)
Category (with children)
Services (regular page)
Products (regular page)

This method also allows you to use your existing CSS for your wp_list_pages(); Meaning that you don't have to use an additional set of rules for your category menu

View Demo






Real Time Web Analytics ^