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!