Adding list of custom post type to page_archive.php

Community Forums Forums Design Tips and Tricks Adding list of custom post type to page_archive.php

This topic is: resolved

This topic contains 5 replies, has 3 voices, and was last updated by  bizedge 1 month ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #83280

    lucaslem
    Participant
    Post count: 88

    Working from the genesis framework (custom child theme) I am wanting to use the page_archive.php template as a sitemap. Beyond listing recent blog posts via wp_get_archives, I would like to list custom post type posts.

    I am able to list custom taxonomy with wp_list_categories, but it’s the actual posts I would like to list and not the categories. I have googled this for a while but coming out confused from what I am reading.

    Is there something like wp_get_custom_post_archives (and associated arguments)?

    Thank-you.

    #83297

    Sridhar Katakam
    Participant
    Post count: 954
    #83652

    lucaslem
    Participant
    Post count: 88

    Sridhar,

    Thank-you for the snippet. It does work in that my custom posts now appear in the general posts lists, but I suppose I should have been more specific: I would like to display the CPT’s in their own list, separate from the blog posts. In other words:

    What I currently have:

    Custom Post Types:
    nothing

    Blog posts:
    – blog post one
    – custom post type one
    – blog post two
    – custom post type two
    and so on

    What I’m trying to achieve:

    Custom Post Types:
    – custom post type one
    – custom post type two
    and so on

    Blog Posts:
    – blog post one
    – blog post two
    and so on

    Thanks for any help :)

    #83686

    Sridhar Katakam
    Participant
    Post count: 954
    #84256

    lucaslem
    Participant
    Post count: 88

    Sridhar you’re awesome! This is just what I needed. Combined with custom taxonomy queries in the shortcode, I managed to make the sitemap even better than I had hoped :)

    #114617

    bizedge
    Member
    Post count: 3

    Sridhar,
    Am using the Executive Pro theme. Installed the plugin you recommended plus edited page_archive.php as per your instructions.
    The custom post types are now showing in the Genesis Archive page but it list only 10 entries and not the full list of 47 entries. How do I get it to list everything?

    Do advise and thanks in advance.

    Regards
    Andrew

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.