Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Custom pagination slug

$
0
0

Replies: 0

I have a site in spanish and need the pagination slug to be in spanish.
I changed the rewrite rule with an action in my custom theme’s functions.php file.


function re_rewrite_rules() {
  global $wp_rewrite;
  $wp_rewrite->search_base        = 'buscar';
  $wp_rewrite->pagination_base    = 'pagina';
  $wp_rewrite->flush_rules();
}
add_action('init', 're_rewrite_rules');

I’m using the Posts widget with the «Load More» option, and when loading more content, the slug changes to “…/catalogo/page/2/” instead of “…/catalogo/pagina/2/”.
This causes that when clicking on a post and then browsing back, the page is not found.
However, if entering the url with the right page slug (…/catalogo/pagina/2/) the results show correctly.

Is there a way to change the slug used to update the address bar when clicking the Load more button?

Much appreciated.

  • This topic was modified 7 minutes ago by Allewar. Reason: Removing website url for logged users only

Viewing all articles
Browse latest Browse all 59525

Trending Articles