Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Display latest post image only from different categories

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #37839
    incoe
    Participant

    am currently query_posts to grab the latest posts thumbs and displaying them on the home page as such






      $imgs = get_the_post_thumbnail($id,'medium');

      /*get the img URL, delete the tag */

      $output = preg_match_all('//i', $imgs, $matches);

      /*the image URL*/

      $img = $matches [1] [0];
      ?>


    • ">Post image



    am also grabbing the title and displaying it with a hover effect over the image when mouse over using css, my question is can i display the image post from 4 different categories? like to display only the last post from these categories.

    in image 1 it will always grab from category 1, image 2 from category 4, image 3 from category 2 etc … or will i have to keep repeating this loop to get he results i need?

    Thanks in advance.

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.