Tell us what you are trying to do?
I need to display a menu based on the post relationship. The website is divided into regions. Each region should have a region specific menu that also has customs link 'news'. These custom links should dan show a news archive prefiltered with the current region.
So is there a conditional tag based on post relationship. And can i write custom links based on the current region.
Is there any documentation that you are following?
No
no the region menu will be a separate menu that is placed in the sidebar. So either i make a widgetarea to load the menu in or i will create a separate menu area in the layout.
But i don't want my client to have to create a custom menu for every region with the customlinks. It would be so much better if i can automatically do this.
For example:
Each region has the following post types: news, vendors, blogs, events. All the post type are children of 'Regio' (post relationship).
What i would like is to have a menu(or sidebar) that checks which region the (custom) post is related to and show a menu/sidebar based on this. So something like a conditinal:
if post relation is 'region x' show menu 'region x'.
This would already help a lot. What would be even better is if the custom urls in the menu also get build based on the region.
So if i am on region 'westland' and i click on news than it shows an archive with url parameter 'westland' and this only shows 'Westland' news.
I hope i explained my problem accurately. Otherwise let me know.
ok i think i can figure out your solution. I just need to know what the conditional code would be for the postrelationship. Could you give me an example?