WordPress.org

Ready to get started?Download WordPress

Forums

Tutorial: Adding Custom Inputs (5 posts)

  1. amory
    Member
    Posted 8 years ago #

    Link

    I finally wrote a tutorial on the modifications needed to create (extra) custom inputs such as the content and excerpt. I was doing a website for a local bike club, in which I used wordpress for a ride organization tool, and needed four extra inputs to further describe the ride a user was proposing. I realize this no longer really qualifies its purpose as a blog, but the more uses the better, as WordPress is an already incredible piece of work! Anyway, I have yet to try and duplicate the process, but these are all modifications that I made to get everything to work.

    Credit to ColdForged for helping me pull it all together by showing how to actually call the data once it had been stored in the database.

    If anyone has any questions, feel free to post them here or on my website, and I will try and help as best I can

  2. davidchait
    Member
    Posted 8 years ago #

    Customizing/hacking the core of WP is especially useful if you need sort-orderable fields. But if you don't plan to use extra fields to affect the organization of the blog (sorting on their data), users should be aware they can easily use Custom/Meta post fields for the same basic result. Also, you can use a second table in addition to the post table, and just do a JOIN between the two. While it's a little extra work for the database server, it means upgrading WP is a little bit less of a hassle since you haven't mucked with core tables (just some core code... ;). Actually, as of 1.5.1, you could do a lot of the JOIN work in a plugin, and not need to modify the core for that.

    If you wanted to be able to show a page of rides by distance descending, that'd really use to have extra fields in the post table or a second table. If you wanted to use it as a standard blog, but have some 'extra data' associated with some of the posts, THEN using the custom/meta inputs already built-in to WP is the way to go.

    Keep up the good work showing others how to dig a little deeper... ;)

    -d

  3. amory
    Member
    Posted 8 years ago #

    Thanks, I would guess this probably is going to be more useful for those using WordPress for websites they're building aside from their own blog, where once everything works, they won't need to upgrade. Otherwise as you said it would be somewhat of a hassle.

  4. amory
    Member
    Posted 8 years ago #

    Update:
    I put together a working WordPress zip file with four extra inputs/fields. This eliminates the need to change any files or create the tables in phpMyAdmin. Also, you could always comment out one or more of the inputs if you don't need that many.

    http://www.bluewebpages.com/blog/2005/05/wordpressfields/

  5. andyt963
    Member
    Posted 7 years ago #

    hey amory

    Do you still have the zip file? Your url doesnt work.

Topic Closed

This topic has been closed to new replies.

About this Topic