2

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!

3 Answers 3

3

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.

3
  • In the end I didn't find any solution that worked for me, but I hate leaving a question "unanswered". :) One day when I have a bunch of time I'll start from scratch with one of the many options offered here and see if I can get it to work - it just took too much re-engineering to go back from the point where I was at in my previous budget.
    – Michelle
    Commented Mar 24, 2011 at 16:29
  • @FriendlyWP - I'd be interested in knowing why those others didn't work for you and what you would like to see. I'm working with a team of people who want to create a plugin that will address the issues that would make 80-90% of developers choose it. Basically we want to create a defacto standard. You can contact me directly via my profile if you like. Commented Mar 25, 2011 at 3:55
  • It wasn't the solutions, it was that I had 99% of what I wanted working already with WPAlchemy and didn't have the time to start again. Post2Post & ZigConnect seem like they would work, but neither came with all the things I already had working with WPAlchemy - full TinyMCE textareas w/upload image buttons, separate img upload functionality, easy display of all the content of those fields and more I'm forgetting now. Since this wasn't a feature requested by the client I had to move on. Thx again & good luck with your plugin - happy to help test if you ever need it!
    – Michelle
    Commented Mar 25, 2011 at 15:39
2

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.

1
  • The problem is, I need each Office to include a full name, short name and URL (for the display side of things). Is that possible with Taxonomies? I thought they were like tags.
    – Michelle
    Commented Mar 8, 2011 at 23:57
1

I suggest creating a custom taxonomy office for agreements post type. For including meta boxes in editing page of agreements post type, you can use this script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.