Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My custom post types are not being queried on 1.2.6 #44

Closed
jonathandarchy opened this issue Jul 3, 2017 · 0 comments
Closed

My custom post types are not being queried on 1.2.6 #44

jonathandarchy opened this issue Jul 3, 2017 · 0 comments

Comments

@jonathandarchy
Copy link

jonathandarchy commented Jul 3, 2017

Hello,

I've registered a custom post type and created a cmb2 attached posts field in my options page:

$cmb->add_field( array(
    'name'    => __( 'Projects', 'glp' ),
    'desc'    => __( 'Drag...', 'glp' ),
    'id'      => 'projects_en_arr',
    'type'    => 'custom_attached_posts',
    'options' => array(
        'show_thumbnails' => true, // Show thumbnails on the left
        'filter_boxes'    => true, // Show a text box for filtering the results
        'query_args'      => array(
            'post_type' => 'projects',
            'post_status' => 'publish',
            'posts_per_page' => -1
        ),
    ),
) );

These are the CPT args , (I'm using extended_cpts to register it) :

'public'             => true,
'publicly_queryable' => true,
'show_ui'            => true,
'show_in_menu'       => true,
'query_var'          => true,
'capability_type'    => 'post',
'has_archive'        => false,
'hierarchical'       => false,
'menu_position'      => 6,
'supports'           => array( 'title', 'author', 'thumbnail','editor' ),

This returns no results in the given metabox on the admin screen, however, if I change post type to 'page' or 'post' it works as expected.
I've tried to register a fresh custom post type and that one did not work as well.
Also tried on a different website and same results.

I downgraded to 1.2.4 , works well.

Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant