Home / Admin / Customisation and pagination of vendor list
Duplicate Snippet

Embed Snippet on Your Site

Customisation and pagination of vendor list

Code Preview
php
<?php
<?php
// Pagination wrapper opening tag
add_filter( 'wcv_pagination_before', 'wcv_pagination_before_wrapper' ); 
function wcv_pagination_before_wrapper( $html ) { 
	return '<div class="somethign else">'; 
}
// Pagination wrapper closing tag 
add_filter( 'wcv_pagination_after', 'wcv_pagination_after_wrapper' ); 
function wcv_pagination_after_wrapper( $html ) { 
	return '</div>'; 
}
// Pagination links arguments that may need to change if your theme overrides these too. 
add_filter( 'wcv_pagination_args', 'wcv_pagination_link_args', 10, 3 ); 
function wcv_pagination_link_args( $args, $current_page, $total_pages ) { 
	// Modify this argument array to replicate what your theme uses 
	return array(  
			    'base' => get_pagenum_link( ) . '%_%',  
			    'format' => 'page/%#%/',  
			    'current' => $current_page,  
			    'total' => $total_pages,  
			    'prev_next'    => false,  
			    'type'         => 'list',  
	); 
}
?>

Comments

Add a Comment