0
I need to do the following, take the news content and its images of a page and show on the main page(Bs the current news, and this page is not in WP only the others) follows the images with the detailed explanation
This is the main page, where there is news that has the image news I have to show the latest news from the other pages that have the image below this
briefly: I have to take the links and images of the news from the other pages, and show in this index
Obs: I had failed attempts by the bank, using this function
$sql = mysql_query("SELECT DISTINCT wposts.* FROM wp_3_posts wposts
LEFT JOIN wp_3_postmeta wpostmeta ON wposts.ID = wpostmeta.post_id
LEFT JOIN wp_3_term_relationships ON (wposts.ID =
wp_3_term_relationships.object_id)
LEFT JOIN wp_3_term_taxonomy ON
(wp_3_term_relationships.term_taxonomy_id =
wp_3_term_taxonomy.term_taxonomy_id)
union
SELECT DISTINCT wposts.* FROM wp_4_posts wposts
LEFT JOIN wp_4_postmeta wpostmeta ON wposts.ID = wpostmeta.post_id
LEFT JOIN wp_4_term_relationships ON (wposts.ID =
wp_4_term_relationships.object_id)
LEFT JOIN wp_4_term_taxonomy ON
(wp_4_term_relationships.term_taxonomy_id =
wp_4_term_taxonomy.term_taxonomy_id)
union
SELECT DISTINCT wposts.* FROM wp_5_posts wposts
LEFT JOIN wp_5_postmeta wpostmeta ON wposts.ID = wpostmeta.post_id
LEFT JOIN wp_5_term_relationships ON (wposts.ID =
wp_5_term_relationships.object_id)
LEFT JOIN wp_5_term_taxonomy ON
(wp_5_term_relationships.term_taxonomy_id =
wp_5_term_taxonomy.term_taxonomy_id)
limit 6
");
added a WHERE post_mime_type = 'image/jpeg'
and returned images however all the images of the pages, have a way for me to pick up only from the news categories?
From what I understand, you want to take some of the content from other pages to show in the initial. Like the 6 latest published news will appear at the top. That’s it?
– Hamurabi Araujo
@Hamurabiaraujo That’s right
– Anderson Henrique