Listing all posts with a certain Custom Field

Discussion in 'WordPress' started by MafiaPenguin, Aug 24, 2011.

  1. #1
    Hey everyone,

    This may well be relatively simple but i can't figure it out.

    I'm trying to list on my website every post which has the value 'Yes' in the custom field 'Cinema'. What im trying to accomplish is a list of the films with this value in a Box Office(In cinemas) section on the homepage of www.filmhammer.com. Couldn't think of a better way of doing than using custom fields.

    Thanks for your time, your help would be greatly appreciated.

    Dan,
     
    MafiaPenguin, Aug 24, 2011 IP
  2. Big0ne

    Big0ne Well-Known Member

    Messages:
    2,614
    Likes Received:
    81
    Best Answers:
    0
    Trophy Points:
    165
    #2
    I've been reading your post all over again and I still don't get it.

    So, each field that has value "yes" of a "cinema" you want to appear on homepage?

    Can you be more exact what is the issue regarding custom field?
     
    Big0ne, Aug 24, 2011 IP
  3. MafiaPenguin

    MafiaPenguin Guest

    Messages:
    134
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Oh, ok. Iill give explaining another shot. :)

    The custom fields on wordpress have a name and a value. I have a field called Cinema, and every Cinema field on every post will either have a value Yes or No. Im trying to find a way of showing only the posts (just the titles) that have a value of 'Yes' in the 'Cinema' field in a section of my site.

    I'm aiming to get a small list up (An Out in cinemas list) representing films that are out in cinema today on my website. Me typing the value of Yes in the field would put that film up on the front page, hopefully.

    For example:
    The List.

    FILM IN CINEMA
    FILM IN CINEMA
    FILM IN CINEMA

    FILM IN CINEMA would have the value of yes, so it would show up in the list) Only a select few films would have this value and i will change the value to no after it's out of the cinema.

    Not sure if i'm explaining the issue properly here.Just trying to figure out how to list posts that have a certain custom field value. Thanks. :)
     
    MafiaPenguin, Aug 24, 2011 IP