WordPress Help - Writing PHP
August 11, 2008 9:58 AM   Subscribe

Please help me with writing PHP for Wordpress. I'm trying to use the get_post_custom_values & the wp_list_pages functions to publish a list of pages in the sidebar which display: 1. Pages that share the same parent (I was already able to successfully apply this filter) 2. For the (custom field) meta_key='County'; show only pages which share the same meta_value (custom field value) as the current page.

You can find the current code I'm using here:

Output wp_list_pages Using Dynamic meta_value

My sense is that there are one of two issues; either I'm incorrectly passing the tag parameters (i.e. I've used bad PHP syntax) or because I'm attempting to publish this code within the sidebar and it's outside of the loop.


Perhaps there is a better solution...this a more detailed description of what I'm trying to achieve:

The parent page is Alaska and there is a subpage for each major city in Alaska (assume each subpage contains the required custom fields--meaning that each subpage has a meta_key=County & the meta_value="corresponds to whatever County that City geographically falls within").

I would like to show a list on each subpage of the other subpages which match the meta_value for meta_key='County' (meaning that the subpages shown will all be in the same County as the subpage displaying them).


Thanks so much for any help!
posted by Jhaus to Computers & Internet 2 users marked this as a favorite
 
« Older .int needs a .com FQDN set up. Who in the what...   |   Urban strip tease Newer »
This thread is closed to new comments.