• Resolved [email protected]

    (@mborattogmailcom)


    i have experimented several scripts of pagination without plugin at functions.php and all of them disable the featured image function on wp-admin. What is happening? Please help.

    sample script

    `function kriesi_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 “«“;
    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 “»“;
    echo “</div>\n”;
    }
    }′

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Problem detected – pagination in function.php affects featured image on admin’ is closed to new replies.