Skip to content

Snippet: Disable Next & Previous Post Links

add_filter( 'wpex_has_next_prev', function( $bool ) {
	if ( is_singular( 'events' ) ) {
		$bool = false; // Disable on the events post type
	}
	return $bool;
}, 50 );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top