[Resolved] Create archive page of custom taxonomy categories

Home Forums Support [Resolved] Create archive page of custom taxonomy categories

Home Forums Support Create archive page of custom taxonomy categories

  • This topic has 9 replies, 4 voices, and was last updated 5 years ago by Tom.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #477359
    Craig

    Hello,
    I’m struggling with creating an archive page for my custom taxonomy – resource_categories.

    I want to display/hyperlink the resource categories on this archive page – not the actual posts. The idea is to see all the categories on page, and visitors can drill down into each category from there.

    Is this possible? Do I have to create a custom page template?

    Thanks for any suggestions!

    Craig

    #477490
    Leo
    Staff
    Customer Support

    Hi Craig,

    I would recommend giving Tom’s WP Show Posts plugin a shot and see if it does what you want:
    https://en-ca.wordpress.org/plugins/wp-show-posts/

    If not can you provide a quick example of what it should look like?

    Let us know 🙂

    #477634
    Craig

    Hi Leo,
    Yep, I’ve got a license for WP Show Posts Pro…great plugin, but I don’t think it’ll help me on this one.

    Basically, this is a ‘directory’ with multiple businesses in each category. I need an archive page that displays links to the various resource categories – the taxonomy terms.

    Resource Categories (a custom taxonomy)

    • Accounting Services
    • Architects/Build/Design
    • Advocacy
    • Associations
    • Bank Products & Services
    • …etc.

    When clicking on Architects/Build/Design


    Architects/Build/Design

    • Acme Architects (title is a link to their ‘post/page’)
    • Donovan Designs
    • Buildings by Bob
    • …etc.

    Hope that helps. I was hoping to leverage native taxonomy pages, but that doesn’t seem to work.

    Thanks!

    #477675
    Tom
    Lead Developer
    Lead Developer

    So this is a page which lists out custom taxonomy titles with their posts titles below?

    #478088
    Craig

    Hi Tom
    The ‘landing’ page would be a display of all of the resource categories (a custom taxonomy): accounting services, architects, etc. (posts are not displayed on this page…just the taxonomy term)

    Clicking on the resource category title takes you to a page with all of the posts. This page is already done…just a taxonomy archive page.

    It’s the first landing page – all of the custom taxonomy terms. Didn’t realize it’d be so difficult to construct.

    I’m guessing I have to build something based on this:
    https://developer.wordpress.org/reference/functions/get_terms/

    Thanks

    #478536
    Tom
    Lead Developer
    Lead Developer

    Ah yes, you’re right. Here are some pretty good examples: https://developer.wordpress.org/reference/functions/get_terms/#comment-288

    #478753
    Craig

    Great. Thanks Tom…I’ll take a look at these.

    #479012
    Tom
    Lead Developer
    Lead Developer

    The last example in that comment should have everything you need 🙂

    #879592
    Dan

    Hi Tom

    Could I ask that with the example you referred to in the link – does that code need to be added to functions.php or to a new archive.php template?

    Cheers

    #879741
    Tom
    Lead Developer
    Lead Developer

    Those would go into your archive.php template.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.