Home Forums Theme Support Dokan Function replacing numbers in my URL

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  SEAN 4 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #19418

    Marita
    Member
    Post count: 7

    Im using a temporary URL “http://eae.4f9.sampleurl.com/”.

    The pagnation function is changing the “9” in my URL to the page number. So the pagnation links look like this.

    http://eae.4f1.sampleurl.com/
    http://eae.4f2.sampleurl.com/
    http://eae.4f3.sampleurl.com/
    http://eae.4f4.sampleurl.com/

    Here is the function.

     <?php
                    wp_reset_postdata();
    
                    if ( $product_query->max_num_pages > 1 ) {
                        echo '<div class="pagination-wrap">';
                        $page_links = paginate_links( array(
                            'current' => max( 1, get_query_var( 'paged' ) ),
                            'total' => $product_query->max_num_pages,
                            'base' => str_replace( $post->ID, '%#%', esc_url( get_pagenum_link( $post->ID ) ) ),
                            'type' => 'array',
                            'prev_text' => __( '« Previous', 'dokan' ),
                            'next_text' => __( 'Next »', 'dokan' )
                        ) );
    
                        echo '<ul class="pagination"><li>';
                        echo join("</li>\n\t<li>", $page_links);
                        echo "</li>\n</ul>\n";
                        echo '</div>';
                    }
                    ?>
    #33679

    SEAN
    Participant
    Post count: 56

    I saw your post – did you ever get this solved?

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

The topic ‘Function replacing numbers in my URL’ is closed to new replies.