get all posts wordpress code example
Example: get all posts
$args = array(
'numberposts' => 10,
'post_type' => 'book'
);
$latest_books = get_posts( $args );
$args = array(
'numberposts' => 10,
'post_type' => 'book'
);
$latest_books = get_posts( $args );