June 8, 201214 yr Ok, scratching my head at this one! I have a custom post type called 'portfolio'. Now I have an area on certain pages where I need to output a list of all the posts within this post type. So, as far as I can tell,I have two options; a custom menu or, query posts Simple enough, I can get both options to work nicely. Now the interesting part. I need all new posts within this post type automatically added to the list/menu (simple enough uysing query posts, but not able to do so using a custom menu) AND the current portfolio item needs to be highlighted in a different colour/displayed slightly different (easy to do in a custom menu using 'current-menu-item', but not happening using query posts). So! You see my issue, I need a solution that can handle both the above requests. Fire away WordPress hardcore devs!!
June 8, 201214 yr Have you got "show_in_nav_menus" declared in your register_post_type() args for the custom post type? If not, add it and it should make the post types appear in your custom menu.
June 8, 201214 yr Author Have you got "show_in_nav_menus" declared in your register_post_type() args for the custom post type? If not, add it and it should make the post types appear in your custom menu. Yeah, the post types appear in the menu, the menu just won't populate any new posts for the post type, without the client having to manually add them! No worries though, found this http://css-tricks.com/snippets/wordpress/list-posts-highlight-current/ which has solved the issue and works now. Gotta love Chris Coyier
Create an account or sign in to comment