• Hi!
    I’m trying to use below code to translate the /page/ part of my url on paginated archive pages. The problem is when using the “Refresh URL when filtering” option in your plugin with this method it breaks the filtering.
    Instead of removing the pagination when filtering it keeps the /page/number/ and then adds the filter urls next to it resulting in a 404 error.

    Would it be possible to use this function and still keep the “Refresh URL when filtering” option enabled?

    function re_rewrite_rules() {
        global $wp_rewrite;
        $wp_rewrite->pagination_base    = 'sida';
    }
    add_action('init', 're_rewrite_rules');
    • This topic was modified 2 years, 1 month ago by atomonelone.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author RazyRx

    (@razyrx)

    Hello,

    After add something that change permalink functionality, try in WordPress admin area -> Permalink settings change something and save it, then you can change it back and save again to regenerate all permalinks.

    Regards,
    Oleg

    Thread Starter atomonelone

    (@atomonelone)

    Hi @razyrx
    Thanks for getting back to me so quickly.

    I have already done that before testing. But the it’s still the same. It breaks the filtering.

    To replicate all you have to do is use the function above, flush the permalinks by going to permalink settings like you told me, maske sure the “Refresh URL when filtering” option in enabled and then go to page 2 of a archive page and try to filter the products.

    • This reply was modified 2 years, 1 month ago by atomonelone.
    Plugin Author RazyRx

    (@razyrx)

    Hello,

    Maybe plugin use some earlier hook to get pagination base.
    Try add it to wp hook and priority set to 1.

    Regards,
    Oleg

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Filtering not working with translated pagination url’ is closed to new replies.