------------------------------------------------------------------------------------------------------------------------
İkinci olarak bir siteden aldığım eklentisiz sayfalama kodunda görüntü hataları oluşuyor. Nedeni nedir acaba?
function sayfalama($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 "";
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)? "- ".$i."
":"- ".$i."
- ";
}
}
if ($paged < $pages && $showitems < $pages) echo " - ›
";
if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "- »
";
echo "
";
}
}
ul.numaralar { margin-bottom:-3px; overflow:hidden; list-style-type:none outside none; padding:0px; }
ul.numaralar > li { display:inline-block; padding:3px 6px; margin:3px; border:1px #999999 solid; background:#a4a4a4; font-family: 'Lato', sans-serif; font-size:12px; text-decoration:none; color:#9ae7f4;}
ul.numaralar > li > a { font-family: 'Lato', sans-serif; font-size:12px; text-decoration:none; color:#fff; }