$args numberposts variable
$args = array( ‘numberposts’ => ’10’, ‘post_type’ => ‘newposttype’); $recent_posts = wp_get_recent_posts( $args ); I know it’s not a simple thing to ask but how could I set the numberposts depending on the screen width? That is: for a desktop visitor I show 10 posts and for a mobile visitor I show 3 posts. 2 … Read more