wordpress is converting ?page=2 into /2

with this code

paginate_links( 
  array(
   'base' => @add_query_arg('page', '%#%'), 
   'format' => '?page=%#%&a='.$a, 
   )
)

looks output like this

Read More
<a class="page-numbers" href="/wordpress/something/?page=2;a=1">2</a>

But when I click on it my url goes to www.example.com/something/2/?a=1 is it possible to change it into www.example.com/something/?page=2&a=1?

Thanks

Related posts

1 comment

  1. Try this. You can disable redirection by category name or page name or whatever you choose.

    function wpren_disable_redirect( $query ) {
    
        if( 'uncategorized' == $query->query_vars['category_name'] ) 
            remove_filter( 'template_redirect', 'redirect_canonical' );
    
    }
    add_action( 'parse_query', 'wpren_disable_redirect' );
    

Comments are closed.