• Resolved aluizioll

    (@aluizioll)


    Is it possible to associate a “metabox/custom field” specifically to some post ID, template (eg page-123.php), category, etc.? Sometimes I have a unique page that needs some custom field and it would be confusing for my custumer to see this custom field in all Pages (“Page” as a post type). Also, I’d not like to create a Custom Type just for one Page, like “Contacts”. In short, I need some different custom fields only for some specific pages, is it possible somehow?

    http://ww.wp.xz.cn/extend/plugins/custom-content-type-manager/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor fireproofsocks

    (@fireproofsocks)

    One-off fields breaks the model, and having data integrity is what the CCTM is all about. By having defined classes (i.e. types) of pages, you can normalize the database, you can have sensible templates, search reliably, etc.

    There have been a couple feature requests in this direction though: https://code.google.com/p/wordpress-custom-content-type-manager/issues/detail?id=481 and more specifically here: https://code.google.com/p/wordpress-custom-content-type-manager/issues/detail?id=7&can=1

    But I’m extremely reluctant to introduce that kind of fly into the ointment: as soon as you open up that can of worms, you have to put if-statements and other conditionals throughout your templates, and you end up with an unsustainable mess (or as WP calls it: “normal”).

    If you have a one-off scenario like this, I’d say you’re probably better off storing that one bit of data as a configuration setting or an option (WP unfortunately does not have a GUI for editing settings data other than the Easter egg hack of navigating to wp-admin/options.php).

    Thread Starter aluizioll

    (@aluizioll)

    Well, I guess some sort of solution will be to create a custom type even for a single page. Of course, I’m taking into account that my customer has no IT skills and showing fields in places where it has no uses might be confusing. If it were a site for myself it would not be an issue…

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘field association’ is closed to new replies.