• Resolved wpsoul

    (@wpsoul)


    Hi. I have custom loop with pagination on home page. It’s working ok, I use correct function, but when I enable your plugin, all links from home page from pagination redirect to home page again

    I tried different themes, different modules and result is the same. Pagination doesn’t work (links are correct, problem is only in redirect).

    https://wordpress.org/plugins/wc-vendors/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Not enough information in your question to really help you out. If you are custom coding something, it’s a bit up to you to get it working right. 🙂

    Thread Starter wpsoul

    (@wpsoul)

    Ok. I use custom loop with WP Query on home page. Loop has such code before

    <?php $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; ?>

    Inside args

    ‘paged’ => $paged,

    Links are generated correct. Like site.com/page/2, site.com/page/3

    But when I click on them – I got redirect on home page site.com

    At first, I think there is a problem with my pagination function in theme. But without plugin it’s working ok. Then, I tried to use another themes (Avada, Sahifa) and also added custom loop to home page. And got the same issue. All pagination links from homepage are not working (redirect to home page)

    The only place we use the get_query_var is on this file:

    https://github.com/wcvendors/wcvendors/blob/a6556e16a1434c79d0d3524f33e17b05c0ce7923/classes/includes/class-wcv-shortcodes.php

    Tinker around, see what you come up with. It sounds like you know what you’re doing with PHP, if there’s something we need to change that makes sense to change, let us know. 🙂 Open source, baby!

    Thread Starter wpsoul

    (@wpsoul)

    Hi, after day of research problem – I am a bit closer to locate problem.

    First of all, I found that problem is gone if I delete stroke

    $options = get_option( $this->id . '_options' );

    in classes/admin/settings/classes/sf-class-settings.php

    So, I thought that the problem is in one of plugin options. Of course, first of possible option was permalink for shop page, because you use some add_rewrite_rule based on this settings. But when I disabled all things that connected to this option – nothing was changed. Then, I continued test and disabled one by one different settings.

    And found one stroke. If I disable it – pagination works.

    It’s in classes/front/orders/class-orders.php

    When I disabled function public function display_shortcodes() – everything works

    Even if I disabled stroke

    is_page( WC_Vendors::$pv_options->get_option( 'orders_page' ) ) &&

    pagination works. So, can you help me to understand what is the problem? Maybe plugin think that home page is order page? But in settings I have correct page as order page.

    Hi wpsoul,

    I’ve created a GitHub ticket for this, at:

    https://github.com/wcvendors/wcvendors/issues/219

    If you’d like to hop in on the conversation there it’ll help us better be able to resolve this for you.

    Cheers

    Ben

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Plugin breaks pagination on home page for custom loops’ is closed to new replies.