• The short version:
    I need the ability to add a custom field to the Post/Paged Editor interface, beyond what the postmeta/custom field tags can do.

    The Long Version:
    There are a dozen or so applications I can think of where this would be beneficial to me but I’ll cover a specific one for example.

    I’ve got a site (http://collectorsedition.org) where I’ve got an extensive database external to WP. I have custom templates setup to display the database info on WP pages that use that template. In the custom database I have a table that correlates the database record ID to the WP Page ID.

    Because of this when I create a new page in WP I need to specify which DB record ID to use… I could add a custom field where I enter the ID but there are a number of problems wit this:
    1. there is no data fidelity, in that WP stores the custom field info as a varchar as opposed to an int and this could currupt the data, not to mention it could store duplicates where this needs to be a 1 to 1 relationship.
    and
    2. I don’t know the record ID off the top of my head so I’d rather specify the long display name of the record from a drop down list as opposed diving into the db every time I create a new WP page.

    —————
    Where I am so far:
    so far I’ve found that I can append things to the post/page editor through the “the_editor” filter hook. I’ve been able to add a drop down list below the editor window with a database driven list of games with ids correlating to their db record id.

    Now my problem is that I still have no way to utilize that data. It would seem that even if it does get sent with all the other $_POST data upon saving/publishing it’s already been erased by the time I can do anything with it.

    I’m thinking I might be able to grab it using the admin_head action filter or some flavor of admin_head-(post_hook) but I have no idea how to use that filter since it’s completely devoid of useful documentation.

    If anyone has any insight to lend, or could even just point me towards some other plugin that successfully adds custom inputs to the page/post editor I would be very appreciative.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter twistedsymphony

    (@twistedsymphony)

    I can’t believe no one else is interested in this…

    To answer the short version, I think More Fields is one of the best plugins.

    There is also Freshpost:

    Freshpage

    It still needs a bit of work… but they are just about to release a new version..

    I was a bit worried that Fresh post wasn’t going to be maintained, but I’m glad to read that a new version will be available soon – thanks 🙂

    p/s: As it’s based on Custom Write Panel, that aspect works really well. However, I think the image upload/maintenance side of things would probably need a lot more work.

    If your table is accessible to WordPress (MySQL) then you just need to do what you mentioned… If you download my Great Real Estate plugin you’ll see how it’s done although I use an internal table and a lot of fields. Easy to make a dropdown, there’s even a WP function to make a select list (you can discover cool stuff by looking at the WordPress code).

    Thread Starter twistedsymphony

    (@twistedsymphony)

    hmm morefields seems useful but maybe not for this particular project, at first glace it doesn’t look like it’s capable of dynamically generating a drop down, nor communicating with something other than WP tables. I’ll have to give FreshPost and the Great Real Estate plugin a closer look.

    Thanks for the links…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom Fields on Page/Post Editor interface’ is closed to new replies.