Support » Plugin: GigPress » Related posts > custom post type?

  • Resolved staffsdesigner

    (@marcussunday)


    Excited by how well built and useful GigPress seems having spent an afternoon playing with it.

    Slight snag, is that related posts only appears to apply to actual blog posts?

    For the users benefit I’ve added artists as a custom post type, and can manually add each artist back to their own page URL, but then can’t get upcoming shows to display using [gigpress_related_shows] as expected.

    Could I include custom post types somehow?

    Thank you *fingers crossed*

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Barry

    (@barryhughes-1)

    Hi @marcussunday,

    GigPress contains a hook you can use for this very purpose:

    gigpress_related_post_types

    You can use this to filter the array of post types that are used in the relevant query 🙂 (…please also note that providing in-depth help with custom dev tasks is beyond what we can help you with here in the free/community forums, but I hope this is helpful as a starting point if nothing else).

    That’s amazing thanks @barryhughes-1, appreciate your reply.

    I totally understand the limits of the free plugin and the forum, this is a great start thank you.

    I’ll investigate!

    Thanks for the nudge @barryhughes-1, now solved!

    Should anyone else find this thread, this works perfectly:

    add_filter( ‘gigpress_related_post_types’, ‘my_related_post_types’ );
    function my_related_post_types( $related_post_types ) {
    return array( ‘your_post_type_here’ );
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Related posts > custom post type?’ is closed to new replies.