Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wp_query limit 1

// WP QUERY A SINGLE POST (as SQL LIMIT=1)
$args = array(
        'post_type' => 'posts',
        'posts_per_page' => '1', // Get 1 single post
);
$query = new WP_Query($args);
 
PREVIOUS NEXT
Tagged: #limit
ADD COMMENT
Topic
Name
8+6 =