[resolved] Displaying featured image on frontpage (4 posts)

  1. DagMX
    Posted 7 years ago #

    Hey there,
    I need to be able to display a certain image and excerpt from the most recent post within a category on my front page.

    Specifically, my front page needs to display my most recent work from my 'work' category, but just display the image itself and the excerpt.

    I have a vague idea on how to do this, by using the get_post_meta, but i'm not sure how to only target, only the 1st post in only the work category and get only the image and excerpt.

    I am putting the image link as a custom field as I assume I should?

    Thank you very much for any assistance.

    EDIT: I also realised it would make sense if I had a custom field that said weather or not the post should be featured. If theres a way to check if a post has a feature value of yes or no and posting it/moving on to the next one accordingly, that would be great.

    Thanks again.

  2. Oren Yomtov
    Posted 7 years ago #


    3 should be the category id of work

  3. DagMX
    Posted 7 years ago #

    Thanks a lot!
    I'll try that in the morning and see if I can get it working.

  4. DagMX
    Posted 7 years ago #

    Thanks. That got it working

Topic Closed

This topic has been closed to new replies.

About this Topic