• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Hazlitt Eastman at WP-Brighton 2011 - WordPress Custom Post Types
 

Hazlitt Eastman at WP-Brighton 2011 - WordPress Custom Post Types

on

  • 752 views

 

Statistics

Views

Total Views
752
Views on SlideShare
752
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Hazlitt Eastman at WP-Brighton 2011 - WordPress Custom Post Types Hazlitt Eastman at WP-Brighton 2011 - WordPress Custom Post Types Presentation Transcript

    • Diving into Wordpress Custom Post Types Hazlitt Eastman www.manta9.com @hazlitteastmanWordpress theme and plugin development, Codeigniter, PHP / MySQL / Javascript / HTML / CSS
    • What are we going to look at?- What are Custom Post Types?- Web site example- Useful plugins- Code www.manta9.com @hazlitteastman
    • What are Custom Post Types?Provide a method by which we can structure differenttypes of website content. (not just Posts and Pages)Examples: - Adverts - DVDs - Books - Testimonials - Tour dates www.manta9.com @hazlitteastman
    • Website Front End Examplewww.offthekerb.co.ukContains 11 Custom Post Types www.manta9.com @hazlitteastman
    • Useful Plugins- Can be created in functions.php using the register_post_type() Wordpress function- Custom Post Type UI- Verve Metabox- More Fields- Advanced Custom Fields www.manta9.com @hazlitteastman
    • Website Back End Examplewww.offthekerb.co.uk- As an Editor- As an Administrator www.manta9.com @hazlitteastman
    • Code example using query_posts()query_posts( posts_per_page=-1&post_type=dvds); if(have_posts()) : while(have_posts()) : the_post(); //loop opened $image = get_post_meta($post->ID, image_2, true); $link = get_post_meta($post->ID, link_2, true); $title = get_the_title(); echo "<li>n"; echo "<a href="http://" . $link . "" target="_blank"><img src="" .$image . "" alt="" . $title. "" /></a>n"; echo "</li>n"; endwhile; //loop closed endif; //have_posts closed www.manta9.com @hazlitteastman
    • What have we looked at?- What are Custom Post Types?- Web site example- Useful plugins- Code www.manta9.com @hazlitteastman
    • Diving into Wordpress Custom Post Types Questions... www.manta9.com @hazlitteastman