• Hi,

    I have a new query inside the page.

    When I call wp_pagenavi from https://test.com/net/x-page this adress

    it creates me page adresses like https://test.com/net/x-page/page2
    https://test.com/net/x-page/page3 etc..

    I want to change this adress’s to https://test.com/c/yc/page2
    https://test.com/c/yc/page3 to prevent dublicate content. to link it (category)

    I found that this adress given by get_pagenum_link( $page ) function from wordpress to the wp_pagenavi.

    And get_pagenum_link function uses remove_query_arg to obtain this adress.

    But this process being before all query.

    So how can I change this adress from net/x-page/page2 to /c/yc/page2

    If I cannot solve the problem I will redirect net/x-page/page2 page to the /c/yc/page2 but this will not solve my problem because I want to show page’s content in first page.

    Are there any solution

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author scribu

    (@scribu)

    It would involve some serious hacking of $wp_rewrite and other bits of WordPress, which might break other things. I don’t think it’s worth the hassle.

    I would just use a NOINDEX meta tag or a rel=canonical instead.

    Thread Starter netinial

    (@netinial)

    Dear scribu

    thank you for your answer.

    Actually I have such a problem.

    I’m calling 2 loop in one page while creating this result.

    first loop is regular,

    <?php while (have_posts()) : the_post(); ?>
    <div <?php post_class() ?> id=”post-<?php the_ID(); ?>”>
    <?php endwhile; ?>

    when loop finish I call new loop.

    <?php if (is_page(array(‘gulets’))) : ?>
    <?php
    wp_reset_query();
    $query_inside_page = ‘cat=15&showposts=15’;
    query_posts($query_inside_page);
    include “boat-list-yb.php”;
    wp_pagenavi2();
    ?>
    <?php endif; ?>

    Even I use wp_reset_query() or $wp_query = null; it is gives me still gulets adress. https://test.com/gulets/page2

    Are there any way to isolate 1st loop from main loop. So I just want to take adress of regular category list

    https://test.com/category/yc/page1 etc.

    Plugin Author scribu

    (@scribu)

    Thread Starter netinial

    (@netinial)

    Scribu,

    Ok but wp_pagenavi looking for main loop.
    So it is not effecting any result.

    Even I try

    $wp_query = new WP_Query();
    $wp_query->query(‘category_name=yc’);

    while ($wp_query->have_posts()) : $wp_query->the_post();
    endwhile;

    No luck. Are not there any solution to pass another loop to the wp_pagenavi (except of main loop) ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP-PageNavi] Pagination link problem.’ is closed to new replies.