Viewing 10 posts - 1 through 10 (of 10 total)
  • #225064
    opus95448
    Member
    Post count: 33

    How can I change the slug used for pagination?

    Example: http://bsh.opus-kommunikation.de/wp2/dynamics-nav/page/2/

    It would be enough to only have “2”, not “page”

    Thanks!

    #225077
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    That’s the default from WordPress.
    Not 100% sure if it’s possible to remove that part, I know it can be changed.

    That a complex changes that are already outside our support scope.

    Hope you understand.

    -Rui

    #225098
    opus95448
    Member
    Post count: 33

    FYI

    function re_rewrite_rules() {
        global $wp_rewrite;
        // $wp_rewrite->author_base = $author_slug;
    //  print_r($wp_rewrite);
        $wp_rewrite->author_base        = 'autor';
        $wp_rewrite->search_base        = 'buscar';
        $wp_rewrite->comments_base      = 'comentarios';
        $wp_rewrite->pagination_base    = 'pagina';
        $wp_rewrite->flush_rules();
    }
    add_action('init', 're_rewrite_rules');
    #225100
    opus95448
    Member
    Post count: 33

    Maybe you can help me with another problem.

    The Shop page has “Archive” added to it’s title (In the tab in the browser). How can I remove that? I think it also affects the blog posts page.

    #225106
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Try this code to change it for you desired title. Add it to the functions.php of your child theme.

    /**
     * Change the Shop archive page title.
     * @param  string $title
     * @return string
     */
    function wc_custom_shop_archive_title( $title ) {
        if ( is_shop() ) {
            return str_replace( __( 'Products', 'woocommerce' ), 'My title', $title );
        }
    
        return $title;
    }
    add_filter( 'wp_title', 'wc_custom_shop_archive_title' );

    Thanks for the other code, I tried the link you sent for page 2 without the page and it didn’t worked. Just saying that the permalinks changes can give a lot of headaches.

    -Rui

    #225109
    David Martin – Support
    Moderator
    Post count: 20834

    To amend the Archive from the shop title, please install Yoast SEO plugin Dashboard => SEO => Titles & Metas => Post Types => Custom Post Type Archives => Products.

    The shop page is listed as a Products custom post type archive. You can add your title in the product Title field.

    -David.

    #225116
    opus95448
    Member
    Post count: 33

    Thanks for the idea with SEO Yoast. It worked for the shop homepage, but the category pages still have “Archive” in the title. Can you tell me how to remove that?

    #225119
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    From the code provided try to change this line

    if ( is_shop() ) {

    to this one

    if ( is_shop() || is_product_category() ) {

    If doesn’t work try David solution.

    -Rui

    #225120
    opus95448
    Member
    Post count: 33

    Nevermind, it worked with setting the Title tag of every WooCommerce category to

    %%term_title%% %%page%% %%sep%% %%sitename%%

    #225122
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Ok. Glad it’s sorted.
    -Rui

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register