Site icon Hip-Hop Website Design and Development

Listing posts with a value in a custom field

I read several posts and stack exchange answers but still cannot put the code together to work.

I read the post Query posts by custom fields

I have posts with custom fields, lets say "publisher" with a value "IBM".

I have a page listing all the values for the custom field "publisher".

I want IBM to link to a search result for all the posts with this meta_value.

My index.php page begins with

        <?php while(have_posts()){
        the_post(); ?>

I need to send to index.php the request with meta_key and meta_value, add a filter to the query and list the results, but I don’t know how to "stitch" everything so it will do what I want.

Thanks.