Just found the answer..
Add posts_per_page
in the arguments as -1
.
It should look like this:
$args = array(
'post_type' => 'lirik_melayu',
'posts_per_page'=> -1, // set the limit post to UNLIMITED (-1 is unlimited)
'orderby' => array(
'ID' => 'DESC' ,
),
);
$query = new WP_Query( $args );
$query_contents=Array();
while ( $query->have_posts() ) {
$query->the_post();
array_push($query_contents,Array(
"id"=>get_the_ID(),
"title"=>get_the_title(),
"url"=>get_permalink(),
));
echo get_the_title()."<br />";
}