• Hi all

    We’re having an issue where we can’t see the connected posts (a custom post type we’ve created, called “Featured Products”) on previews of scheduled posts, but they show up fine when the post goes live.

    We’re using the same essential code as shown here under “Displaying connected pages/posts”
    https://github.com/scribu/wp-posts-to-posts/wiki/Basic-usage

    But the the preview of the post is not displaying anything.

    When I print_r on $connected, I get this (amongst other code):
    [request] => SELECT wp_posts.*, wp_p2p.* FROM wp_posts INNER JOIN wp_p2p WHERE 1=1 AND wp_posts.post_type = 'featured_products' AND (<em><strong>wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private</strong></em>') AND (wp_p2p.p2p_type = 'posts_to_featured_products' AND wp_posts.ID = wp_p2p.p2p_to AND wp_p2p.p2p_from IN (SELECT wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.ID IN (3206) AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC )) ORDER BY wp_posts.post_date DESC [posts] => Array ( ) )

    Emphasis is mine.

    Any clue on where this is coming from? Or how to adjust?

    We’d just like to have confirmation that the featured product displays correctly with the post preview.

    THX

    https://wordpress.org/plugins/posts-to-posts/

Viewing 1 replies (of 1 total)
  • Same here. I need to get a connection between a published custom post and a draft of another custom post. But it seems that drafts are filtered away.

    How can i force it to retrieve even the drafts?

    Thanks,

Viewing 1 replies (of 1 total)
  • The topic ‘Preview on Draft Posts?’ is closed to new replies.