Skip to main content
2 of 2
replaced http://stackoverflow.com/ with https://stackoverflow.com/

The Base is the Problem:

'base' => add_query_arg('listpostspage','%#%'),

Here ist the full code:

$pagination_args = array(
    'base'            => add_query_arg('listpostspage','%#%'),
    'format'          => '?listpostspage=%#%',
    'total'           => $the_query->max_num_pages,
    'current'         => $paged,
    'show_all'        => false,
    'end_size'        => 1,
    'mid_size'        => 2,
    'prev_next'       => true,
    'prev_text'       => __( 'Zurück', 'Theme' ),
    'next_text'       => __( 'Weiter', 'Theme' ),
    'type'            => 'plain',
    'add_args'        => false,
    'add_fragment'    => ''
);

Thanks goes to raison over at stackoverflow who posted this answer.

GDY
  • 448
  • 4
  • 19