Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Wordpress Pagination for WP_Query

<div class="pagination">
    <?php 
        echo paginate_links( array(
            'base'         => str_replace( 999999999, '%#%', esc_url( get_pagenum_link( 999999999 ) ) ),
            'total'        => $query->max_num_pages,
            'current'      => max( 1, get_query_var( 'paged' ) ),
            'format'       => '?paged=%#%',
            'show_all'     => false,
            'type'         => 'plain',
            'end_size'     => 2,
            'mid_size'     => 1,
            'prev_next'    => true,
            'prev_text'    => sprintf( '<i></i> %1$s', __( 'Newer Posts', 'text-domain' ) ),
            'next_text'    => sprintf( '%1$s <i></i>', __( 'Older Posts', 'text-domain' ) ),
            'add_args'     => false,
            'add_fragment' => '',
        ) );
    ?>
</div>
Comment

PREVIOUS NEXT
Code Example
Php :: groupby in laravel with count 
Php :: laravel pluralization text 
Php :: switch php version 
Php :: check if post id exists wordpress 
Php :: Internal error: xmlSchemaXPathProcessHistory, The state object to be removed is not the first in the list. 
Php :: Internal error: xmlSchemaDocWalk, calling xmlSchemaValidateElem(). 
Php :: redirect wordpress 
Php :: Fetch Data From Database With MySQLI 
Php :: twig for 
Php :: php strip tags 
Php :: laravel model quard 
Php :: enable shortcodes in text widgets 
Php :: php in array key 
Php :: xampp check php version 
Php :: laravel end date greater than start date validation 
Php :: laravel gigapay list employee 
Php :: php iterate array 
Php :: checks input if number only in php 
Php :: run artisan command from controller 
Php :: how to add cutom menu option in wordpress 
Php :: create array from string with commas php 
Php :: rus text check php 
Php :: php run python script 
Php :: laravel forelse 
Php :: laravel collection implode 
Php :: laravel when 
Php :: jetstream seed user with team 
Php :: get_posts term 
Php :: laravel download file from public folder 
Php :: php executable not found visual studio code ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =