[wp-hackers] Filter custom post type archive page by custom fields

Alex Hempton-Smith hempsworth at gmail.com
Fri Oct 28 12:43:47 UTC 2011


Hi all,

I've been banging my head against a brick wall trying to get this done, so
hopefully somebody can help.

I have a custom post type at example.com/people/person
I have a custom field stored as the following array:
[0] => array(
    'title' => 'Manager',
    'organisation' => 'Acme Inc.'
),
[1] => array(
    'title' => 'Code Wrangler',
    'organisation' => 'Code Co.'
)

I need to be able to have the following URL filter the results,
example.com/people/?title=Manager, to show all custom post types with the
title 'Manager' in their custom field.

I'm not worried about pretty permalinks for this, just getting it working
would be fine!

Does anybody have any suggestions?

- - - -
Kind regards,
Alex Hempton-Smith

www.alexhemptonsmith.com
www.twitter.com/hempsworth


More information about the wp-hackers mailing list