I have a custom post type with 9 custom pages on WP 4.5.
When I got to Settings -> Reading -> A static page -> front page dropdown,
I see a list of all the standard wp pages plus at most 5 of my custom pages (the most recent 5 of them).
I have no clue on why just 5 and I need to show all of them.
I'm using this code to load them on the dropdown:
function my_custom_add_to_dropdown( $pages, $r ){
if('page_on_front' == $r['name']){
$args = array(
'post_type' => 'mytype'
);
$stacks = get_posts($args);
$pages = array_merge($pages, $stacks);
}
return $pages;
}
add_filter( 'get_pages', 'my_custom_add_to_dropdown', 10, 2 );
I have checked with print_r($stack) and the output is of the most recent 5 custom post pages. I need all 9 of them there. (I always want all of them there)
Anyone can help me? What I must change to unlock all the custom post pages to show up?