Parent pages only
-
I created a metabox:
function mymetabox( $meta_boxes ) { $prefix = ''; $meta_boxes[] = array( 'id' => 'relatepagebox', 'title' => esc_html__( 'Related Pages', 'metabox-online-generator' ), 'post_types' => array('post' ), 'context' => 'advanced', 'priority' => 'default', 'autosave' => 'false', 'fields' => array( array( 'id' => $prefix . 'relatepage', 'type' => 'post', 'name' => esc_html__( 'Related Pages', 'metabox-online-generator' ), 'post_type' => 'page', 'field_type' => 'select_advanced', 'query_args' => array(), 'attributes' => array(), 'clone' => 'true', 'sort_clone' => 'true', ), ), ); return $meta_boxes; } add_filter( 'rwmb_meta_boxes', 'mymetabox' );
How to display only parent pages in
select_advanced
list?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Parent pages only’ is closed to new replies.