[resolved] Problem with archives pagination and permalinks (3 posts)

  1. reasilvia
    Posted 3 years ago #

    Hi, I'm quite new to WordPress and I'm using the Path theme (latest version) on WP 3.4.2. Everything works fine but the pagination function.
    I set permalinks to month+name (/%year%/%monthnum%/%postname%/) but now the only link which works is the first "Next" link.
    The other buttons ("Previous", "1", "2", "3", and so on) REWRITE the url, so that instead of (for example) ../2012/10/page/3 I have /3013/10/page/3; or instead of ../2012/10/page/1 I have /1011/10/page/1.
    So it seems to replace the number not only in the page number, which is correct, but also in the year, thus creating a link which doesn't exist.
    Other themes work fine with any kind of permalinks.
    Am I allowed to submit a link so that you can see what I mean? :)
    Thank you in advance!

  2. Sami Keijonen
    Theme Author

    Posted 3 years ago #

    This seems like a bug. Here is a fix before next update.

    Put this in child theme functions.php inside setup function.

    add_filter( 'loop_pagination_args', 'my_pagination_args' );

    And this after setup function.

    function my_pagination_args( $args ) {
    	if ( !is_search() )
    		$args['base'] = user_trailingslashit( trailingslashit( get_pagenum_link() ) . 'page/%#%' );
    	return $args;

    Here is premade child theme if you need one.


  3. reasilvia
    Posted 3 years ago #

    Now it works! Thanks a lot!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic


No tags yet.