I have 2 custom post types – offered and wanted. I want these items in my menu. How can I do this?
I have tried adding a category to the post type and then creating a link to that category but for some reason that isn’t working.
Someone else has said to give my custom posts an archive and have all the posts showing in that archive. Ok, but I’m not sure how to create an archive for my custom post, especially as I’m not using pretty URLs because it wouldn’t work with my custom posts, so had to put it back to the default.
add this to the
register_post_type()Also check the ‘screen options’ in the top right corner. that ‘Custom Links’ are checked.
Usually you can get to the ‘acrhive’ of a custom post type via exapmle.com/customposttype
if perma is enabled and the posttype has
'has_archive' => true,To add this to the menu you will have to add a custom/hard coded menu item.
Alternatively you can make a theme template page on which you query the custom post type.
In effect making your own archive which will show up in the menu screen as a page.