Ironically, WordPress StackExchange has the perfect example of what I’m trying to do. At the foot of every page here is a key/legend of associated sites with a colour reference for each one. I need to create an identical looking key of my posts showing the project names and project colours for each project in my portfolio site. The project names and colour references are already in custom fields within my custom post type. However obviously a query will just return all the results.
I’ve been looking at GROUPBY but not been able to get it to work, anyone got a better idea or can tell me where I’m going wrong? Sigh, I can’t seem to get an answer to this from WordPress support or StackOverFlow, it can’t be that difficult surely.
This site simpley uses â and a span color for each link.
To query custom fields for your post type you should be using
get_post_meta
http://codex.wordpress.org/Function_Reference/get_post_meta
To customize the query, check out http://codex.wordpress.org/Function_Reference/WP_Query , you can include or exclude practically anything you want.