Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm completely starting over with a wordpress project that began a couple of weeks ago, and basically i'm totally discovering wordpress, so please bare with me.

I might be completely misunderstanding what has been coded until now, but I've been asked to generate a menu based on the "cutom-post-types" and their respective categories.

When using the

<?php wp_nav_menu(); ?>

hook, I thought it would be enough.

BUT: when editing the menu and it's content in the menu admin section it seems that I cannot have each category of a custom post-type to be listed UNDER each custom-post-type. All I can do is select each category, like so :

Beauty Campaigns ...

shops ...

Wich leads to this on the public site :

Beauty Campaigns ...

Shops ...

My only wisgh is to be able to avoid hacking wordpress as much as possible, while finally having :

News Beauty Cmpaigns ... Trends shops ...

in both the menu admin and the final public menu.

What did I miss ? Thanks a lot.

share|improve this question

2 Answers 2

Your best bet if you want them to show using the default drag and drop function is to register a custom taxonomy for the custom post type, http://codex.wordpress.org/Function_Reference/register_taxonomy.

You can also use the taxonomies parameter when you register your CPT function. http://codex.wordpress.org/Function_Reference/register_post_type

The alternative is to make a custom filter for your nav menu that is populated from your custom post type, though in most cases I recommend the first option.

share|improve this answer

My workaround for this was to just use custom links that linked to example.com/post-type-slug...it's not the best solution, but it works.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.