Forums

Meta Values Searchable and Sortable? (4 posts)

  1. ellie.roepken
    Member
    Posted 1 year ago #

    Hi everyone. I'm somewhat new to developing for WordPress and I need some help.

    I'm using hooks on the search function to make it also search for the keyword in meta values, but when doing this, the search is not sortable by meta value using query_post() arguments. It's sortable by meta value when I comment out the hooks, but I need them both to work at the same time. In short, how can I make it so that meta value is searchable AND sortable?

    Let me know if you need me to elaborate...I wrote this in kind of a hurry.

  2. ellie.roepken
    Member
    Posted 1 year ago #

    Can someone please help? This is for a client and review is on Wednesday...

  3. prasnala
    Member
    Posted 1 year ago #

    yes i also have same problem, in function query_post() we pass array which contain different variables like $query['meta_key']='_ep_end';
    $query['meta_compare']='>=';
    $query['meta_value']=$curdate;

    which are use meta information for filtering purpose, but what if i want to filter result with multiple meta information?

  4. prasnala
    Member
    Posted 1 year ago #

    in one article http://wordpress.org/support/topic/query_posts-using-multiple-custom-values-meta_value?replies=3. michell says it is not possible, He also give one usefull article on that http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query . i can create query in mysql but it will increase my work. I work on other programmer plugins eventpress. if i create query it need to work on lots of stuff for that. pls help us micheal, I think there should be some solution for use multiple meta information in query_post function.

Topic Closed

This topic has been closed to new replies.

About this Topic