Using Custom Fields For Fun And Profit

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Using Custom Fields For Fun And Profit - Presentation Transcript

    1. Using Custom Fields For Fun and Profit WordCamp Fraser Valley 2009 Dave Zille
    2. Contact Info Dave Zille Email: dave@dazil.com Twitter: @dazil Skype: davezille Web: http://www.dazil.com Blog: http://www.dazil.com/blog
    3. Outline WordPress custom fields What is a Custom Field? How do I use them? Usage examples Fun Add interesting info to your blog posts or pages Add images/thumbnails to posts or pages Profit Add Shopping Cart to your WordPress site
    4. WordPress Custom Fields What is a custom field? A little bit of information you can store alongside a WordPress post or page A custom field has two components A key/value "pair" Key is the name of the meta data element eg. image Value is the information itself eg. "myphoto.jpg" Examples: Key: url Value: "http://www.mysite.net" Key: my_mood Value: "Happy as a clam"
    5. WordPress Custom Fields Usage: WordPress function get_post_meta() get_post_meta($post_id, $key, $single) Example: get_post_meta($post->id, "my_mood", true) will return: "Happy as a Clam" Demo
    6. Custom Field Usage Examples Demo site: Comic Sightings Adding contributor information to a post: Custom field key: credit-name Demo see single.php (sample code)
    7. Custom Field Usage Examples Demo site: Comic Sightings Adding photos to a post: Custom field key: main-image Demo see product-demo.php (sample code)
    8. Custom Field Usage Examples Demo site: Comic Sightings Adding a shopping cart Custom field keys: price, product-name Demo see product-demo.php (sample code)
    9. Questions? Slides and sample code: Web: http://www.dazil.com/blog
    SlideShare Zeitgeist 2009

    + Dave ZilleDave Zille Nominate

    custom

    230 views, 0 favs, 1 embeds more stats

    Using WordPress custom fields for fun and profit, a more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 230
      • 214 on SlideShare
      • 16 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds
    • 16 views on http://www.dazil.com

    more

    All embeds
    • 16 views on http://www.dazil.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories