• Resolved panda

    (@alejorostata)


    I need to add rewrite rules for pagination on my endpoint with a query using wl_paged variable. How can I do that?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Stan

    (@stantinv)

    Hi @alejorostata,

    It’s not an easy task that can be achieved with a few strings of code and it requires customization. Since you’ve already added the endpoint at My Account, we’ve provided a tip on how to proceed further.

    P.s. Please, proceed replying in a thread insted of creating a ticket for every your reply!

    Thanks for undertsanding,
    Stan

    Thread Starter panda

    (@alejorostata)

    You keep marking my post as “Solved”, I didn’t even read your reply yet, I didn’t even test your suggestion yet. That is why I keep on making another post. If that’s the case, please don’t mark it as solve yet. There is a thing “Status” at the right sidebar of WordPress and I can change it to “Solved” anytime as soon as it really solves the issue.

    Anyway, one of your support said;

    The issue happened because you need to add rewrite rules for pagination on your endpoint.
    Wishlist query using wl_paged variable for the number of the page to adjust wishlist products query.

    Then, I expected this to work but it doesn’t and yet you mark my previous post as “solved”;

    function add_wc_endpoint_rewrite() {
        add_rewrite_rule('wl_paged/([^/]+)/?$', 'index.php?wl_paged=$matches[1]', 'top');
    }
    add_action( 'init', 'add_wc_endpoint_rewrite' );
    
    function wc_endpoint_query_vars( $vars ) {
        $vars[] = 'wl_paged';
        return $vars;
    }
    add_filter( 'query_vars', 'd_wallet_query_vars', 0 );
    Plugin Support Stan

    (@stantinv)

    @alejorostata

    The topic was marked as “resolved” because you have been provided with a tip on how to proceed further. Customization is not included in our free help here and I hope you undertand this.
    If you have some difficulties implementing the code, we can only suggest you to hire a developer that will be able to help you with this request.

    Thread Starter panda

    (@alejorostata)

    oh God…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘add rewrite rules for pagination’ is closed to new replies.