• gulliver

    (@gulliver)


    I’m trying to better understand custom posts, and how best to use them to handle hosts and shows for a radio project.

    I’m don’t know how the hierarchy/taxonomy works.

    If I’ve understood correctly, I can create a parent/child relationship between custom post types – so ‘show’ can be a child of ‘host’. But apparently cpts can also have categories.

    Presumably, initially I need to create two cpts – ‘hosts’ and ‘shows’.

    Hosts seems straightforward, in that for each host I simply do an ‘add new host’ post, which is then published similarly to ordinary posts.

    It’s the ‘shows’ that are confusing me… to add a new show I’ll presumably do an ‘add new show’ post – but I don’t know how to then assign a particular show to the appropriate host.

    On the edit screen for a show, is there a dropdown (similar to choosing a parent for a page), or is there a check-box option (like assigning a post to a category)?

    I’ve read a lot (perhaps too much) on this and not only failed to understand enough, but also deterred myself from experimenting.

Viewing 3 replies - 1 through 3 (of 3 total)
  • swayam.tejwani

    (@swayamtejwani)

    you can create a custom taxonomy for show and custom post type for “host” and then you can assign show to host, it will be like same as post & category relation which by default wordpress has but for your own entites like “host” & “show”.

    Thread Starter gulliver

    (@gulliver)

    Thanks.

    If I understand correctly (and I’m really not sure I do)…

    1 I create a cpt of ‘host’.
    2 I then create a create a custom taxonomy for ‘show’ (but not a cpt for ‘show’).

    But don’t I need cpt for ‘host’ and ‘show’? …so that I can publish:
    1 A page which lists all hosts.
    2 A page for each host – which contains info about that host, and a list of their shows.
    3 A page which lists all shows.
    4 A page for each show – which contains info about that show.

    I’m sorry if I’m laboring things, my brain has almost given-up on this… I can usually fudge my way through most WP things, but this issue is beating me.

    Thread Starter gulliver

    (@gulliver)

    UPDATE…

    With a clearer head, I think I now understand.

    Create cpt for ‘host’.
    Create cpt for ‘shows’.
    Register custom taxonomy for ‘show’.

    So when I ‘add new show’ the edit screen will list the hosts so that I can select the appropriate one and assign the show to that host.
    Maybe I’m wrong, but it’s time to experiment.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom posts’ is closed to new replies.