Results 1 to 3 of 3

Thread: Search by Custom Fields on click

  1. #1
    Member 123Malaysia's Avatar
    Join Date
    Jul 2010
    Location
    Malaysia
    Posts
    92
    Thanks
    5
    Thanked 12 Times in 10 Posts

    Search by Custom Fields on click

    Hi, I wanted to show only certain values based on custom fields. For example to show posts from custom fields meta key : cp_city, meta value : new york on click.

    I've managed to do this with query post as below :

    Code:
    <?php 
    query_posts( array('post_type' => APP_POST_TYPE, 'meta_key' => 'cp_city', 'meta_value' => 'new york') );  ?>
    But not sure how to do this by <a href=".......?s=&meta_key=cp_city&meta_value=new york> so when i click, it returns the search of the custom fields. Anyone knows how to do this?

    Thanks in advance!

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,958
    Thanks
    169
    Thanked 3,405 Times in 3,276 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    Member 123Malaysia's Avatar
    Join Date
    Jul 2010
    Location
    Malaysia
    Posts
    92
    Thanks
    5
    Thanked 12 Times in 10 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. multiple drop-down search form using custom fields and custom taxonomies [part 2]
    By davidhaz in forum ClassiPress General Discussion
    Replies: 12
    Last Post: November 4th, 2014, 07:40 AM
  2. Search Custom Fields?
    By adi11 in forum Report Clipper Bugs
    Replies: 4
    Last Post: August 29th, 2011, 11:54 AM
  3. [TUTORIAL] multiple drop-down search form using custom fields and custom taxonomies [part 1]
    By davidhaz in forum ClassiPress General Discussion
    Replies: 6
    Last Post: June 6th, 2011, 06:40 AM