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

Alex Hempton-Smith hempsworth at gmail.com
Fri Oct 28 13:54:39 UTC 2011


To clarify, the post meta key is 'position' and the value is the array I
previously posted.

- - - -
Kind regards,
Alex Hempton-Smith

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



On Fri, Oct 28, 2011 at 1:43 PM, Alex Hempton-Smith <hempsworth at gmail.com>wrote:

> 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