variables - Wordpress: Change number of posts from administration -
i have problem showposts.
$recent = new wp_query('showposts=10'); while($recent->have_posts()) : $recent->the_post();
and change number of "showposts" administration.
i found instruction how create widget in /wp-admin/ dont know how create simple form change , save number of showed posts.
thank help.
under settings > reading in wp-admin have configuration of how many posts shown in each page of queries. can remove 'showposts' parameter , wordpress value configured in wp-admin.
also, showposts deprecated. should use 'posts_per_page' :)
https://codex.wordpress.org/class_reference/wp_query#pagination_parameters
hope helps.
Comments
Post a Comment