I’m working on a client site and need the following:
- A custom post type called ‘Agreements’
- On the Agreements edit panel, show a list of “Offices” checkboxes. Users can select multiple Offices per Agreement.
Here’s the rub. I want the admins to be able to add/edit Offices, which would each have a title, abbreviation and URL. The admins can add/edit Offices in a totally separate place, but I want these new Offices to show up in the Agreements edit panel automatically.
I’ve tried a number of approaches, but I’m having trouble pulling the Offices list into the Agreements custom edit panel. Magic Fields comes close with its “Related Types” option, and I almost got WPAlchemy working but ultimately failed.
Any suggestions on better / easier ways to do this? Thanks so much for any and all tips and advice!
I’d recommend you consider creating a Custom Post Type of
'office'
and use one of the following custom post relationship plugins to maintain relationships between Agreements and your Offices:Note: Also, here’s a link to my own pinboard that I’ll update in the future with any other WordPress Post Relationship Plugins as I find them.
I would add a register_taxonomy custom taxonomy “offices”
that would make your queries simpler and you will get a metabox with checkboxes just like you want.
to limit the creation of these taxonomy terms to admin only you can use any of the many role capabilities plugins out there.
I suggest creating a custom taxonomy
office
foragreements
post type. For including meta boxes in editing page ofagreements
post type, you can use this script.