Advance Post Image help
-
Hello all, I’m new in the forums, but i’ve been using wordpress for a while now. I hope someone can help me with this hack i guess.
I’m using a plugin called Advance Post Image, which displays the first image of every post just writting a code in the template. What i want it to do, is display the first images from certain category only. This is because i want to display in the homepage, 9 images, like this (X being the image) randomly, which it takes from all post from all categories.
X X X
X X X
X X XSo far so good, bur when i click in a category link, i want it to display the same thing as the homepage, but only from that category.
What I’m thinking, is to copy the plugin and modify that, i think what I need to modify is this line, but i don’t know how.
$sql = "SELECT ID, post_title, post_content FROM $wpdb->posts WHERE post_content LIKE ('%<img%') AND post_status = 'publish' AND post_type ='post'";
Any Ideas? I’m using the latest version of WordPress.
Thank you in advance.
The Plugin: https://fairyfish.net/2007/10/16/advanced-post-image-plugin/
Download from WordPress Repository: https://www.ads-software.com/extend/plugins/advanced-post-image/
- The topic ‘Advance Post Image help’ is closed to new replies.