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

    (@servispg)

    Benjamin Can I do this to the file called theme-functions.php file?
    Where does this code go exactly? I do not want to mess the site up.
    This is the them I am using and the code in this file below that.
    Zion Churches and Non-Profits: theme-functions.php (includes/theme-functions.php)

    <?php

    function pagination($pages = ”, $range = 2)

    {

    $showitems = ($range * 2)+1;

    global $paged;

    if(empty($paged)) $paged = 1;

    if($pages == ”)

    {

    global $wp_query;

    $pages = $wp_query->max_num_pages;

    if(!$pages)

    {

    $pages = 1;

    }

    }

    if(1 != $pages)

    {

    echo “<div class=\”pagination\”>”;

    if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo “< First“;

    if($paged > 1 && $showitems < $pages) echo “<<“;

    for ($i=1; $i <= $pages; $i++)

    {

    if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))

    {

    echo ($paged == $i)? “<span class=\”current\”>”.$i.”</span>”:”“.$i.”“;

    }

    }

    if ($paged < $pages && $showitems < $pages) echo “>>“;

    if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo “Last >“;

    echo “<span class=\”numbers\”>Page “.$paged.” of “.$pages.”</span></div>\n”;

    }

    }

    ?>

    Thread Starter servispg

    (@servispg)

    I put that at the bottom and it is fixed now thanks!

    No problem, glad I could help.

    Thanks,
    Ben

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘404 Error’ is closed to new replies.