Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter pyaesonecgm

    (@pyaesonecgm)

    Thanks @loid45

    i tried that before. I add below code and it carries url in href like (http://localhost/Q-PASS-WEB/blog?paged=2) format in prev and next. But when i click that, it still display (http://localhost/Q-PASS-WEB/blog/page/2) in url of browser

    $total_pages = $custom_query->max_num_pages;
    $current_page = max(1, get_query_var('paged'));
    $pagination_base = get_pagenum_link(1);
    $format = '?paged=%#%';
    paginate_links(array(
        'base'      => $pagination_base . '%_%',
        'format'    => $format,
        'current'   => $current_page,
        'total'     => $total_pages,
        'prev_text' => '<img src="' . img_path('common/p_arrow_l.svg') . '" alt="Previous">',
        'next_text' => '<img src="' . img_path('common/p_arrow_r.svg') . '" alt="Next">',
    ));
Viewing 1 replies (of 1 total)