• Resolved gimperdaniel

    (@gimperdaniel)


    Is it possible to use meta_key and meta_value on query_posts()?

    if so, how? cause my query posts just ignores thoses..

    query_posts(‘meta_key=album_id&meta_value=32&cat=15&orderby=track_num&order=ASC’);

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • I can at least point you to another possibility:
    Displaying_Posts_Using_a_Custom_Select_Query

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Is it possible to use meta_key and meta_value on query_posts()?

    Short answer: No.

    Long answer: MichealH’s link shows a few ways to do custom SQL to get posts based on that sort of information. But it’s not for the novice, you should know SQL before doing this sort of thing. If you don’t, look for a plugin to let you do it instead.

    Thread Starter gimperdaniel

    (@gimperdaniel)

    I know SQL and I had already found the Displaying_Posts_Using_a_Custom_Select_Query above…thanks. I was just making sure that was not a easier way…I will just have to polish on my LEFT JOINS…

    🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Is it possible to use meta_key and meta_value on query_posts()?’ is closed to new replies.