Search
 
SCRIPT & CODE EXAMPLE
 

PHP

set posts_per_page

global $wp_query;
$wp_query->set('posts_per_page', 1);
$wp_query->query($wp_query->query_vars);
Comment

posts_per_page offet

function wpsites_exclude_latest_post( $query ) {
	if ( $query->is_home() && $query->is_main_query() ) {
		$query->set( 'offset', '1' );
	}
}

add_action( 'pre_get_posts', 'wpsites_exclude_latest_post', 1 );
Comment

PREVIOUS NEXT
Code Example
Php :: cookies php syntax 
Php :: laravel routes not working on production server 
Php :: laravel carbon created_at date in current month 
Php :: axios post not sending data php 
Php :: laravel maximum execution time of 30 seconds exceeded 
Php :: Change WordPress Login Logo Url 
Php :: how to set select option value dynamically in php 
Php :: create email template php 
Php :: laravel db table get one columns value 
Php :: php timestamp to iso8601 
Php :: wordpress get product category name by termid 
Php :: laravel model withCount relationship condition 
Php :: php unique assoc array by value 
Php :: laravel model wherein 
Php :: laravel 5.7 
Php :: laravel capsule schema datatime CURRENT_TIMESTAMP 
Php :: Genrate Random Integer 10 digits in php 
Php :: how to give optional parameter in route 
Php :: declare variable in php class 
Php :: radio button select in php 
Php :: php bulk insert mysql 
Php :: Laravel Adding Cookie Consent 
Php :: php strom key 1 
Php :: worpdress pods taxonomy get custom field 
Php :: get request header codeingiter3 
Php :: get pages with template wp php 
Php :: php check if valid xml 
Php :: lenght de un array php 
Php :: rule for radio button in laravel 
Php :: laravel use controller function in another controller 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =