Taxonomy & CPT Question

[ad_1]

I’m creating an online menu for a site. I plan to create a taxonomy called Items with terms for Mains, starters and drinks.

I need to create the menu item page, which I could do using ACF in a custom post type.

Is this the right approach? How can I tie in my custom post type with my taxonomy?

Thanks

[ad_2]
3 Comments
  1. How are you registering your custom taxonomy? When you create it, you can attach it to your CPT. I would make it hierarchical.

  2. This seems like a fine plan altho it seems like the CPT would be something like “menu items” and the taxonomy would be something like “menu category.”

    When you declare your taxonomy you also declare what post type(s) it’s associated with.

  3. I am not sure I get it – when you declare a CPT you add their custom taxonomy or any taxonomy you want the ability to categorize the CPT by – in the

    ‘taxonomies’ => array(),

    declaration

    Then the archive for the taxonomy would be taxonomy-{taxonomy-term}.php

    see

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer