Custom menu by category and publish date
In short, what I am trying to achieve is a custom, hierarchical menu of posts, first by category (driven by taxonomy) and then by their post_date.
I anticipate my menu looking something like this:
– Category 1
– Category 2
I have the first part working, displaying a menu entry for each taxonomy type using wp_list_categories. The code is as follows:
$taxonomy = 'log-category'; $orderby = 'date'; $show_count = 1; $pad_counts = 0; $hierachical = 1; $title = ''; $cat_args = array( 'taxonomy' => $taxonomy, 'oderby' => $orderby, 'show_count' => $show_count, 'pad_counts' => $pad_counts, 'hierachical' => $hiereachical, 'title_li' => $title ); ?> <ul> <?php wp_list_categories($cat_args); ?> </ul> </li>
My question is, how can I add the sub categories of ‘year’ and ‘month’ to my custom menu? The post_date data is inputed via the normal out-the-box metabox on the admin screen. The posts I am wishing to build the menu for are from a custom post type called ‘swp_disclosurelog’.
Thanks in anticipation of your help.
- The topic ‘Custom menu by category and publish date’ is closed to new replies.