WordPress.org

Ready to get started?Download WordPress

Ideas

Custom fields within theme templates

  1. Angry Creative
    Member

    12345

    Sorry dude, I misunderstood lonchbox.

    Posted: 2 years ago #
  2. lonchbox
    Member

    I don´t get it, sorry :P

    If a metabox can be related to custom post type why related to a page template?

    Posted: 2 years ago #
  3. gavinsmith
    Member

    12345

    Well, what if you need a template for your 'about' page, which includes two distinct columns of content and an address, contact information, etc. all requiring specific markup? It doesn't make any sense to create a post type for it, right? What, a post type called 'about' and a permanent single post of that type called 'About'? See what I mean?

    Posted: 2 years ago #
  4. Angry Creative
    Member

    12345

    Its either that, or writing your own custom "Theme options" page for the backend (and spending a LOT of more time than you should)..

    We did a page for a restaurant just a couple of weeks ago, and their "about" information works just like that. So ugly!

    Reminds me of working with WordPress "back in the day" when we had to make posts, post them in a specific category, exclude that category from the frontpage, search, archives etc, and then print it out on the specific page.

    A good source of inspiration would probably be Drupal, where you can make your own custom fields for anything pretty much anywhere.

    Posted: 2 years ago #
  5. lonchbox
    Member

    Ok @gavinsmith I get your point. The way I relate a custom meta box or custom field is with id or name of the page/post. The idea to use the template is very nice. But have to think the steps. First create and setup the custom fields or meta boxes, then create the Template, then relate the custom fields to or meta boxes to that template. So when I choose on the page the template to use the mb/cf appear dynamically. It´s correct?
    I think this could be a fantastic plugin also.

    Posted: 2 years ago #
  6. gavinsmith
    Member

    12345

    I actually went ahead and built an early, early version of a plugin to accomplish this. I'm currently working on refactoring inputs into extensions of an input class before I build out more input types and the admin UI, but the functionality is all there for textareas and inputs. I hope to push that large code update in the next few days. Options like repeatable inputs forthcoming as well - I'd really appreciate any input!

    http://gavinsmith.github.com/WordPress-Template-Specific-Fields/

    Posted: 2 years ago #
  7. Angry Creative
    Member

    12345

    Check out http://eskapism.se/code-playground/simple-fields/ for some inspiration! :)

    Posted: 2 years ago #
  8. Zeb
    Member

    My suggestion is simple!

    If the back-end uses the same theme structure and the look, which is very user friendly, then it should be considered that developers could copy/paste codes and just change the names or something.

    For example, I have seen some web based solutions that allows a developer just go through a few steps, name the fields what ever they want, define spaces and in the end grab the code.

    Advanced developers may be able to hack the code themselves but many site developers are not like them. There should be an easier way to achieve something more user friendly.

    Please take a look at Bill Erickson's solution here: http://www.billerickson.net/wordpress-metaboxes/

    Simple and nice looking meta box. This kind of look should be arranged in the admin which in turn has the same look as the used theme itself, if so desired.

    Posted: 2 years ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    10 Votes
  • Status

    This idea is under consideration