Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter ravigusain123

    (@ravigusain123)

    Do i need to put the whole below mentioned code into functions.php

    ======================= code =================================

    add_filter(‘uwpqsf_pagination’, ‘custom_pagi’,”,4);
    function custom_pagi($html,$max_num_pages,$pagenumber,$id){
    $range = 1;//this is the range, you can change it to 1, 2 or 3
    $showitems = (1 * $range)+1;
    $pages = $max_num_pages;
    $paged = $pagenumber;
    if(empty($paged)) $paged = 1;

    if($pages == ”)
    {

    $pages = $max_num_pages;

    if(!$pages)
    {
    $pages = 1;
    }
    }

    if(1 != $pages)
    {
    $html = “<div class=\”uwpqsfpagi\”> “;
    $html .= ‘<input type=”hidden” id=”curuform” value=”#uwpqsffrom_’.$id.'”>’;

    if($paged > 2 && $paged > $range+1 && $showitems < $pages)
    $html .= ‘? ‘.__(“First”,”UWPQSF”).”;
    $previous = $paged – 1;
    if($paged > 1 && $showitems < $pages) $html .= ‘? ‘.__(“Previous”,”UWPQSF”).”;

    for ($i=1; $i <= $pages; $i++)
    {
    if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
    {
    $html .= ($paged == $i)? ‘<span class=”upagicurrent”>’.$i.'</span>’: ”.$i.”;
    }
    }

    if ($paged < $pages && $showitems < $pages){
    $next = $paged + 1;
    $html .= ”.__(“Next”,”UWPQSF”).’ ?’;}
    if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) {
    $html .= ”.__(“Last”,”UWPQSF”).’ ?’;}
    $html .= “</div>\n”;$max_num_pages = $pages;
    return $html;
    }

    }

    ===================== code =================================

    Thread Starter ravigusain123

    (@ravigusain123)

    First I have use below method to achieve next and previous buttopn

    $this->ajax_pagination($pagenumber,$query->max_num_pages, 4, $id,$getdata);

    I replaced 4 with 3 or 2 but nothing happen.

    Then I tried the second part of code i.e.

    add_filter(‘uwpqsf_pagination’, ‘custom_pagi’,”,4);
    function custom_pagi($html,$max_num_pages,$pagenumber,$id){
    $range = 1;//this is the range, you can change it to 1, 2 or 3
    $showitems = (1 * $range)+1;
    $pages = $max_num_pages;
    $paged = $pagenumber;
    if(empty($paged)) $paged = 1;

    if($pages == ”)
    {

    $pages = $max_num_pages;

    if(!$pages)
    {
    $pages = 1;
    }
    }

    if(1 != $pages)
    {
    $html = “<div class=\”uwpqsfpagi\”> “;
    $html .= ‘<input type=”hidden” id=”curuform” value=”#uwpqsffrom_’.$id.'”>’;

    if($paged > 2 && $paged > $range+1 && $showitems < $pages)
    $html .= ‘« ‘.__(“First”,”UWPQSF”).’‘;
    $previous = $paged – 1;
    if($paged > 1 && $showitems < $pages) $html .= ‘‹ ‘.__(“Previous”,”UWPQSF”).’‘;

    for ($i=1; $i <= $pages; $i++)
    {
    if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
    {
    $html .= ($paged == $i)? ‘<span class=”upagicurrent”>’.$i.'</span>’: ‘‘.$i.’‘;
    }
    }

    if ($paged < $pages && $showitems < $pages){
    $next = $paged + 1;
    $html .= ‘‘.__(“Next”,”UWPQSF”).’ ›‘;}
    if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) {
    $html .= ‘‘.__(“Last”,”UWPQSF”).’ »‘;}
    $html .= “</div>\n”;$max_num_pages = $pages;
    return $html;
    }

    }

    but the above code is giving error, add_filter is undefined.

    Can you please suggest me the appropriate ans.

    Thread Starter ravigusain123

    (@ravigusain123)

    Yes I am using ajax to filter the result.
    Is there any way to add prev and next button in pagination, other than wp-pagenavi.

    Please help me.

    Hi barinagabriel

    Please help me
    I would like to change the format of both confirmation/activation email and email which sent username and password after activation.

    I want a proper email template for my email……and want to put company logo in email.

    Hope to hear some solution from you

Viewing 4 replies - 1 through 4 (of 4 total)