Artículos del blog (de 100 en 100) '; $sql="SELECT * FROM wp_posts WHERE post_status='publish' ORDER BY post_date DESC LIMIT $ini, 100"; //echo "$sql"; $cons=mysql_query($sql)or die(mysql_error()); while($files=mysql_fetch_array($cons)){ if ($data=="" or $data!=substr($files[post_date],0,10)){ $data=substr($files[post_date],0,10); echo "

$data
"; } $titol=utf8_encode($files[post_title]); echo "

$titol

"; } $sql="SELECT * FROM wp_posts WHERE post_status='publish'"; //echo "$sql"; $cons=mysql_query($sql)or die(mysql_error()); $n=mysql_num_rows($cons); $resto=$n % 100; if ($n>"100"){ $links=ceil($n/100); for ($i=1;$i<=$links;$i++){ if($i==$links){ $inici=($i*100)-100; $final=$inici+$resto; $texte .= " - $i."; break; } $inici=($i*100)-100; $final=$i*100; $texte .= " - $i"; } echo "
Artículos: ". $texte.""; } ?>