Skip to content

Posts from different post types don't show on the Add Post meta box #56

Description

@lmartins

Hi,

First and foremost thank you for this extremely useful plugin.
I've testing out to start using on my WP projects but I've noticed a subtle but significant problem.

Im testing Stream Manager to populate a few post lists on a homepage, where there multiple zones with contents from different post types. In most cases each zone is populated with contents from a single CPT, meaning that I use the provided filters quite a lot:

add_filter('stream-manager/options/id=420', function( $defaults ) {
    $defaults['query'] = array_merge($defaults['query'], array(
		'post_type' => 'page',
		'posts_per_page' => 8,
		'meta_query' => array(
	        array(
	         'key' => '_thumbnail_id',
	         'compare' => 'EXISTS'
	        ),
	    )
	));
    return $defaults;
});

In this particular example I'm excluding posts that do not have a featured image, but the issue I'm describing next happens with or without that parameter.

The problem quite simply is that when I try to use the Add Post meta box two things happen:

  1. It still suggests posts for this stream, even though the stream is configured to only accept pages
  2. It won't suggest any page, no matter exists or not pages that would meet the criteria above.

Anything I can do to avoid this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions