- Home
- Categorie
- Coding e Sistemistica
- CMS & Piattaforme Self-Hosted
- Articoli suddivisi per categorie
-
Articoli suddivisi per categorie
Salve ragazzi, ho provato tanto ma non riesco, il problema è semplice, mostrare articoli per determinate categorie.
Incollo il codice dove non riesco ad inserire la giusta stringa per impostare il parametro della categoria:
global $image_thing_tags; $image_thing_tags = 'main-image-post2'; endif; $limit = 40; global $wpdb; $querystr = " SELECT distinct wposts.* FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = 'closed' AND wpostmeta.meta_value = '0' AND wposts.post_status = 'publish' AND wposts.post_type = 'product' ORDER BY wposts.post_date DESC LIMIT ".$limit; $pageposts = $wpdb->get_results($querystr, OBJECT); ?> <?php $i = 0; if ($pageposts): ?> <?php global $post; ?> <?php foreach($pageposts as $post): ?> <?php setup_postdata($post); ?> <?php //Walleto_get_post(); if($view != "grid") walleto_get_post_list_view(); else Walleto_get_post(); ?> <?php endforeach; ?> <?php else : ?> <?php $no_p = 1; ?> <div class="padd100"><p class="center"><?php _e("Sorry, there are no posted products yet","Walleto"); ?>.</p></div> <?php endif; ?>
Grazie