WordPress:Script ultimi n articoli.
Se volete visualizzare, gli ultimi n articoli inseriti su wordpress potete utilizzare questo codice:
< ? php
$myposts = get_posts("numberposts=4");
?>
E :
< ? php foreach($myposts as $post) :?>
< a href="" title="Vai all'articolo < ?php echo get_the_title(); ?>">
< ? php
echo substr(the_title("","",false),0,40)."...";
?>
< ? php endforeach; ?>
Il codice, mostra gli ultimi 4 articoli pubblicati.
Se volete modificare ciò dovete sostituire numberposts=4 con numberposts=NUMERO ARTICOLI
Related posts:
- Classe wordpress per facilitare le cose
- [guida]Creare Script php AUTOMATICO
- Aggiungiamo: Anteprima Articolo a wordpress
- Script login php-mysql con cookie
- [php/mysql] semplice script login con sessioni
This entry was posted on Saturday, August 29th, 2009 at 11:28 am and is filed under Programming. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Tagged with: javascript • php • wordpress






