• Not sure how to list all (custom) posts in child term of taxonomy.

    I made a Custom Post Type of Newsitems
    With a hierarchical taxonomy with terms
    News (parent)
    Press (child)
    Sitenews (child)

    Here’s what I did:

    Write a new Newsitem with term Press
    Display all the News on a page with a custom template news-page.php gives me a nice listing of Newsitems by using $news = new WP_Query(‘post_type=newsitems’) etc.

    Viewing that single newsitem posted in Press with a list of terms (get_the_term_list) with a custom template of single-news.php gives me the content and the terms:

    Title
    Content
    Posted in Press (url=news/press)

    And the bummer: clicking on Press to show all the news in Press gives a 404. Could anybody explain why and how to solve this? Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter zyrq

    (@zyrq)

    extra info:
    permalink settings are /%category%/%postname%
    with default permalinks there’s no 404
    Custom post types were made with Custom Post Type UI plugin,
    rewrite=yes

    Thread Starter zyrq

    (@zyrq)

    Fundamental question: can this be done?

    A page with a slug of news: example.com/news, slug=news
    Custom Post Type: News, slug=news
    Taxonomy: News, slug=news
    Terms: Press, Sitenews,…

    The News page: example.com/news
    The titles:
    URL: example.com/news/text1
    URL: example.com/news/text2
    URL: example.com/news/text3

    Single News view:
    URL: example.com/news/text1
    Title: Great news
    Content: Lorem etc.
    Posted in: Press (url=news/press)

    Archive of all posts in Press( url=news/press)
    Title Press1
    Title Press2

    Thread Starter zyrq

    (@zyrq)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hierarchical taxonomy 404 Not Found’ is closed to new replies.