Support » Plugin: No Category Base (WPML) » [Plugin: WP No Category Base – WPML compatible] SOLUTION to fix category pagination 404 error

  • Resolved newbieee

    (@newbieee)


    Hi,

    if you are using custom pagination_base i.e. you don’t have /page/2/ but for example /strana/2 (Czech translation of ‘page’) and you would like this plugin to work even for paged categories ( http://www.domain.com/my_cutom_category/strana/2/ ), you need to edit a line in no-category-base-wpml.php inside the .ZIP file.

    THIS:
    $category_rewrite[‘(‘.$category_nicename.’)/page/?([0-9]{1,})/?$’] = ‘index.php?category_name=$matches[1]&paged=$matches[2]’;

    TO:
    $category_rewrite[‘(‘.$category_nicename.’)/’.$wp_rewrite->pagination_base.’/?([0-9]{1,})/?$’] = ‘index.php?category_name=$matches[1]&paged=$matches[2]’;

    AND GRAB (it’s a few lines below):
    global $wp_rewrite;
    AND PUT IT SOMEWHERE BEFORE THE
    foreach($categories as $category) {

    That’s it. If plugin author is willing to make a change in the plugin, it would be for the best..

    http://wordpress.org/extend/plugins/no-category-base-wpml/

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WP No Category Base – WPML compatible] SOLUTION to fix category pagination 404 error’ is closed to new replies.