Results 1 to 7 of 7

Thread: Altering the custom fields interface

  1. #1
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,801

    Default Altering the custom fields interface

    I've been Googling around and am having trouble finding an idiot proof tutorial on how to modify the custom fields interface in the WordPress admin panel. In a few days I need to add a custom field box which has a list of sub-pages from elsewhere on the site that the site admin can choose, but at the moment the only way I can do it is via the regular custom fields interface which is kinda awkward for the client since they'd need to manually punch in a page ID.

    I found the following blog post about this sort of thing, but I found it a little confusing and am assuming there is a much simpler tutorial out there on the topic that I just haven't found:
    http://sltaylor.co.uk/blog/control-y...custom-fields/

    Do any of you know of any suitable tutorials? Or have a few tips on how to go about doing this?

  2. #2
    t31os's Avatar
    t31os is offline Hello World
    Join Date
    Feb 2010
    Location
    UK
    Posts
    23

    Default

    Been having a dig around for you (google), i think this is probably the most straight-forward tutorial for adding a simple meta box..
    farinspace.com/2010/04/how-to-create-custom-wordpress-meta-box/

    You could just replace the textarea with a dropdown, which you could populate using something like wp_dropdown_pages(), and of course strip away the bits you don't need, i just found this particular example relatively easy to follow (although i had no issue following the one you linked to, hehe).

    Hope that helps... :)

  3. #3
    sleary's Avatar
    sleary is offline Hello World
    Join Date
    Dec 2009
    Location
    Texas
    Posts
    21

    Default

    There's the Custom Field Templates plugin.

    I have a tutorial on this in my book. I wasn't going to post that bit online, but... maybe. :)

  4. #4
    sleary's Avatar
    sleary is offline Hello World
    Join Date
    Dec 2009
    Location
    Texas
    Posts
    21

    Default

    Oh, I just found this tutorial, which includes custom fields. It's not bad.

  5. #5
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,801

    Default

    Quote Originally Posted by t31os View Post
    Been having a dig around for you (google), i think this is probably the most straight-forward tutorial for adding a simple meta box..
    farinspace.com/2010/04/how-to-create-custom-wordpress-meta-box/
    Awesome, thanks :) That's just what I was looking for!


    Quote Originally Posted by sleary View Post
    Oh, I just found this tutorial, which includes custom fields. It's not bad.
    That's custom post types, not custom fields unfortunately.

  6. #6
    sleary's Avatar
    sleary is offline Hello World
    Join Date
    Dec 2009
    Location
    Texas
    Posts
    21

    Default

    Look further down. It starts out with post types, but includes custom fields as well.

  7. #7
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,801

    Default

    Thanks, I see it now :)

    I think I glanced at that and assumed it was just teaching how to utilize regular custom fields, not modifying what they looked like.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •