Show recent posts in menu?

you can use a walker like this, class Walker_Recent_Post_Category extends Walker_Category { function start_el(&$output, $category, $depth, $args) { extract($args); $cat_name = esc_attr( $category->name); $cat_name = apply_filters( ‘list_cats’, $cat_name, $category ); $list_recent_cat_post=”<ul class=”show-hide”>”; $args = array( ‘numberposts’ => 5, ‘category_name’ => $category->name ); $myposts = get_posts( $args ); foreach( $myposts as $mypost ) : $list_recent_cat_post .= … Read more

Using a portfolio_category slug in wordpress URL

add ‘rewrite’ => array(‘slug’ => ‘portfolio-categories’), but be sure to remove (not sure why that’s there, it tries hides the slug yet tries to rename it to “products” at the same time?): ‘rewrite’ => array( ‘with_front’ => false, ‘slug’ => ‘products’ ), So it looks like this: function mysite_post_types() { register_post_type(‘portfolio’, array( ‘labels’ => array( … Read more