Support

Account

Home Forums General Issues I need to pull the most recent post with a custom field attributed to it

Solving

I need to pull the most recent post with a custom field attributed to it

  • For example: I have a post type called ‘photography’ that has an optional custom image field called ‘featured’. When ‘featured’ has a value, I want to pull that image even if there have been several posts after it. The idea being that a photographer can change the featured image of their own photographer page (I’m using author.php for this) by simply adding a cover photo the their next photography post.

    • James

    • March 29, 2016 at 3:18 pm

    Hi @atotalpirate

    I believe you can use a true/false field to mark the images as featured and then query the photography posts based on this custom field. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/query-posts-custom-fields/.

    I hope this helps πŸ™‚

  • I think https://gbmod.net/yowhatsapp-apk/ is the best app right now.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.