Support » Plugin: Annual Archive » Archive Multiple Post Types

  • Resolved marioaguera

    (@marioaguera)


    Hello,

    Is it possible to build archives made from two or more custom post types?
    i.e. post_type = [array of post types]

    Many Thanks
    Mario

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor twinpictures

    (@twinpictures)

    good question.
    Just checked the source and the answer is NO!
    That’s crazy.

    I’ll now check archive-pro-matic and see if that offers the ability to pass an array of post types and get back to you on a plan. Look for an update on this topic in 20 minutes or so…

    Thread Starter marioaguera

    (@marioaguera)

    Wonderful. Thank you so much for checking this.

    Plugin Contributor twinpictures

    (@twinpictures)

    OK, neither the free version nor the pro version support multiple custom post types as seen in this demo of the latest version:
    https://spacedonkey.de/3971/archive-pro-matic-multiple-cpt/

    This can be added to the pro version today, if you want to go pro, and we’ll send you a release candidate that includes this feature: if that is an option.

    Regardless, this is a good feature and it should make its way to the free version at some point.

    Thank you for your feedback!

    Thread Starter marioaguera

    (@marioaguera)

    Hello,

    I’m happy to upgrade to pro if it can support this feature.

    BTW: Not sure if this helps, but I found the following code snippet and managed to get the ‘Post’s widget to combine multiple post types in it’s results, by using defining a custom query in functions.php (below) and then setting Query ID in Elementor.

    // Showing multiple post types in Posts Widget
    add_action( ‘elementor/query/my_custom_filter’, function( $query ) {
    // Here we set the query to fetch posts with
    // post type of ‘custom-post-type1’ and ‘custom-post-type2’
    $query->set( ‘post_type’, [ ‘post’, ‘my_custom-post’ ] );

    If you could let me know when this functionality has been added to the Pro version, I will happily purchase it.

    Once again Many Thanks.

    Plugin Contributor twinpictures

    (@twinpictures)

    Got it working:
    https://spacedonkey.de/3971/archive-pro-matic-multiple-cpt/
    As you can see 2017 has both cpt’s
    Let me know should you have any questions.

    Thread Starter marioaguera

    (@marioaguera)

    Aah, that is wonderful, thank-you 🙂

    And I assume activating show_post_count=”true” would therefore display (2) beside 2017, for the multiple cpts example?

    Plugin Contributor twinpictures

    (@twinpictures)

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