WordPress.org

Ready to get started?Download WordPress

Forums

Grab posts by conditional custom field value (1 post)

  1. microkid
    Member
    Posted 6 years ago #

    Hi,

    I have created an event plugin that adds meta_data to posts.

    How can I select posts based on certain conditions applied to the value of a meta_data key? Would I be able to use operators?

    [..] WHERE meta_key = 'startdate' AND meta_value > 1196809200

    One of the meta_data keys holds the date of the event, and I would like to be able to select all events before a certain date.

    TIA

Topic Closed

This topic has been closed to new replies.

About this Topic