get_results("SELECT * FROM wf_posts WHERE post_type = 'page' AND post_status = 'publish' AND wf_posts.ID = '73' ORDER BY ID DESC"); $wp_query->posts = $rows_page; ?> get_results("SELECT meta_value FROM `wf_postmeta` WHERE `post_id` =73 AND meta_key='titolo' OR meta_key='immagine_wellfood' OR meta_key='marchi_wellfood_0_marchio' OR meta_key='marchi_wellfood_0_alt_text' OR meta_key='marchi_wellfood_0_caption_text' OR meta_key='marchi_wellfood_1_marchio' OR meta_key='marchi_wellfood_1_alt_text' OR meta_key='marchi_wellfood_1_caption_text' OR meta_key='marchi_wellfood_2_marchio' OR meta_key='marchi_wellfood_2_alt_text' OR meta_key='marchi_wellfood_2_caption_text' OR meta_key='marchi_wellfood_3_marchio' OR meta_key='marchi_wellfood_3_alt_text' OR meta_key='marchi_wellfood_3_caption_text' OR meta_key='marchi_wellfood_4_marchio' OR meta_key='marchi_wellfood_4_alt_text' OR meta_key='marchi_wellfood_4_caption_text' OR meta_key='marchi_wellfood_5_marchio' OR meta_key='marchi_wellfood_5_alt_text' OR meta_key='marchi_wellfood_5_caption_text' OR meta_key='testo' OR meta_key='testo_2' ORDER BY meta_key DESC"); $wp_query->posts = $rows_page; $i=0; foreach($rows_page as $r){ $array_r[$i] = $r->meta_value; $i++; } $img_page = $mydb->get_results("SELECT guid FROM `wf_posts` WHERE `ID` = ".$array_r[3]." OR `ID` = ".$array_r[6]." OR `ID` = ".$array_r[9]." OR `ID` = ".$array_r[12]." OR `ID` = ".$array_r[15]." OR `ID` = ".$array_r[18]." ORDER BY ID DESC"); $j=0; foreach($img_page as $img_p){ $array_img[$j] = str_replace("http://www.wellfood.biz/","http://www.panperte.com/",$img_p->guid);//$img_p->guid; $j++; } /* $rows_page = $mydb->get_results("SELECT meta_value FROM `wf_postmeta` WHERE `post_id` =73 AND meta_key='titolo' OR meta_key='immagine_wellfood' OR meta_key='marchi_wellfood_0_marchio' OR meta_key='marchi_wellfood_0_alt_text' OR meta_key='marchi_wellfood_0_caption_text' OR meta_key='marchi_wellfood_1_marchio' OR meta_key='marchi_wellfood_1_alt_text' OR meta_key='marchi_wellfood_1_caption_text' OR meta_key='marchi_wellfood_2_marchio' OR meta_key='marchi_wellfood_2_alt_text' OR meta_key='marchi_wellfood_2_caption_text' OR meta_key='marchi_wellfood_3_marchio' OR meta_key='marchi_wellfood_3_alt_text' OR meta_key='marchi_wellfood_3_caption_text' OR meta_key='testo' OR meta_key='testo_2' ORDER BY meta_key DESC"); $wp_query->posts = $rows_page; $i=0; foreach($rows_page as $r){ $array_r[$i] = $r->meta_value; $i++; } $img_page = $mydb->get_results("SELECT guid FROM `wf_posts` WHERE `ID` = ".$array_r[3]." OR `ID` = ".$array_r[6]." OR `ID` = ".$array_r[9]." OR `ID` = ".$array_r[12]." OR `ID` = ".$array_r[15]." ORDER BY ID DESC"); $j=0; foreach($img_page as $img_p){ $array_img[$j] = $img_p->guid; $j++; } * */ ?>
Cibama
Tutti Tutti get_results( "SELECT DISTINCT name, parent, slug FROM wf_terms JOIN wf_term_taxonomy ON wf_term_taxonomy.term_id = wf_terms.term_id WHERE wf_term_taxonomy.taxonomy = 'category' AND wf_terms.name != 'tutti' AND wf_term_taxonomy.count > 0 ORDER BY wf_terms.name ASC" ); //print_r($categories); foreach ( $categories as $category ) { $category_term_id = $category->term_id; $category_parent = $category->parent; $category_name = $category->name; $category_slug = $category->slug; if($category_parent==0){ $category_parent_slug = $category->slug; } ?>
get_results( "SELECT term_id, name FROM wf_terms WHERE wf_terms.name = '$slug'" ); //echo $titlemenu; foreach ( $category_blog_events as $category_blog_event ) { $category_blog_event_name = $category_blog_event->name; $category_blog_event_term_id = $category_blog_event->term_id; } if($category_blog_event_term_id){ $rows = $mydb->get_results( /*"SELECT p.*, meta1.meta_value FROM wf_posts p LEFT JOIN wf_postmeta meta1 ON ( meta1.post_id = p.ID AND meta1.meta_value IS NOT NULL AND meta1.meta_key = '_thumbnail_id' ) JOIN wf_term_relationships ON wf_term_relationships.object_id = wf_posts.ID WHERE wf_term_relationships.term_taxonomy_id = '$category_blog_event_term_id' WHERE p.post_type = 'post' AND p.post_status = 'publish' ORDER BY p.ID DESC"*/ "SELECT * FROM wf_posts JOIN wf_term_relationships ON wf_term_relationships.object_id = wf_posts.ID JOIN wf_postmeta ON (wf_postmeta.post_id = wf_posts.ID AND wf_postmeta.meta_key = '_thumbnail_id') WHERE wf_term_relationships.term_taxonomy_id = '$category_blog_event_term_id' ORDER BY wf_posts.ID DESC" ); } else { $rows = $mydb->get_results( "SELECT p.*, meta1.meta_value FROM wf_posts p LEFT JOIN wf_postmeta meta1 ON ( meta1.post_id = p.ID AND meta1.meta_value IS NOT NULL AND meta1.meta_key = '_thumbnail_id' ) WHERE p.post_type = 'post' AND p.post_status = 'publish' ORDER BY p.ID DESC"); } } else { $rows = $mydb->get_results( "SELECT p.*, meta1.meta_value FROM wf_posts p LEFT JOIN wf_postmeta meta1 ON ( meta1.post_id = p.ID AND meta1.meta_value IS NOT NULL AND meta1.meta_key = '_thumbnail_id' ) WHERE p.post_type = 'post' AND p.post_status = 'publish' ORDER BY p.ID DESC"); } $wp_query->posts = $rows; $wp_query->max_num_pages = count($rows)/6; $n_page_max=round($wp_query->max_num_pages, 0)+1; $mul = 0; ?> get_results("SELECT * FROM wf_posts WHERE post_type = 'attachment' AND ID = '".$rows[$mul]->meta_value."' ORDER BY ID DESC"); //print_r($img[0]->guid); $array_img[$mul] = $img[0]->guid; $array_link[$mul] = get_bloginfo( 'url' ).'/articolo/?id='.get_slug(); $array_title[$mul] = get_the_title(); $array_excerpt[$mul] = get_the_excerpt(); ?> get_results("SELECT * FROM wf_posts WHERE post_type = 'attachment' AND ID = '".$rows[$mul]->meta_value."' ORDER BY ID DESC"); //print_r($img[0]->guid); $array_img[$mul] = $img[0]->guid; $array_link[$mul] = get_bloginfo( 'url' ).'/articolo/?id='.get_slug(); $array_title[$mul] = get_the_title(); $array_excerpt[$mul] = get_the_excerpt(); ?> get_results("SELECT * FROM wf_posts WHERE post_type = 'attachment' AND ID = '".$rows[$mul]->meta_value."' ORDER BY ID DESC"); //print_r($img[0]->guid); $array_img[$mul] = $img[0]->guid; $array_link[$mul] = get_bloginfo( 'url' ).'/articolo/?id='.get_slug(); $array_title[$mul] = get_the_title(); $array_excerpt[$mul] = get_the_excerpt(); ?> get_results("SELECT * FROM wf_posts WHERE post_type = 'attachment' AND ID = '".$rows[$mul]->meta_value."' ORDER BY ID DESC"); //print_r($img[0]->guid); $array_img[$mul] = $img[0]->guid; $array_link[$mul] = get_bloginfo( 'url' ).'/articolo/?id='.get_slug(); $array_title[$mul] = get_the_title(); $array_excerpt[$mul] = get_the_excerpt(); ?> get_results("SELECT * FROM wf_posts WHERE post_type = 'attachment' AND ID = '".$rows[$mul]->meta_value."' ORDER BY ID DESC"); //print_r($img[0]->guid); $array_img[$mul] = $img[0]->guid; $array_link[$mul] = get_bloginfo( 'url' ).'/articolo/?id='.get_slug(); $array_title[$mul] = get_the_title(); $array_excerpt[$mul] = get_the_excerpt(); ?> get_results("SELECT * FROM wf_posts WHERE post_type = 'attachment' AND ID = '".$rows[$mul]->meta_value."' ORDER BY ID DESC"); //print_r($img[0]->guid); $array_img[$mul] = $img[0]->guid; $array_link[$mul] = get_bloginfo( 'url' ).'/articolo/?id='.get_slug(); $array_title[$mul] = get_the_title(); $array_excerpt[$mul] = get_the_excerpt(); ?>