Salve a tutti, io avrei un problema che purtroppo non riesco a risolvere.
Dato che me la cavo abbastanza con PHP ho deciso di creare un template pagina per il mio sito che gira in WP che (in teoria) dovrebbe estrarre dal database solo i POST (niente pagine, solo post) che cominciano per una determinata lettera (per esempio tutti i post che cominciano per "a").
Purtroppo non ne sono stato capace
Sono 3 giorni che ci provo ma niente...l'unica cosa che sono riuscito a fare è stato estrarre tutti i post presenti nel database e ordinarli...
Codice PHP:<?php
global $post;
$tmp_post = $post;
$args = array( 'numberposts' => 0, 'offset'=> 0, 'category' => '1,2,3,4,5,6,7,8,9,10,11,12', post_type => 'post', orderby => 'title', order => 'ASC', nopaging => 'true');
$myposts = get_posts( $args );
foreach( $myposts as $post ) : setup_postdata($post); ?>
[*][url="<?php the_permalink(); ?>"]<?php the_title(); ?>[/url]
<?php endforeach; ?>[/list]
Qualcuno che conosce bene Wordpress è in grado di aiutarmi?
Grazie infinite![]()


Rispondi quotando