WP Smith

Creating WordPress & Genesis Websites Since 2010

  • Home
  • About
  • Services
  • Blog
  • Contact

Jun 12 2011

Example Custom Post Type Tutorials

Understanding WordPress Custom Post Types

In my researching, studying, and writing about custom post types, I have located the following sample custom post types. Some are example tutorials and some aren't. Some are complete and some aren't. However, regardless of the state of the various custom post types, it will serve as a good starting point for many of your custom post types. Please feel free to contact me with any more you may know about! This list does not include any custom post types that have been built into plugins that utilize custom post types. For example, Norcross's FAQ plugin utilizes custom post types for FAQ's or Travis Ballard's TB Testimonials. Plugins are a great place to research and learn more about the manifold purpose that custom post types can take.

My list below includes custom post types on portfolios, events, galleries, photos, podcasts, FAQs, movies, videos, client quotes/praises/testimonials, newsletters, products, before/after images, books, dogs, recipes, coupons, cars, zombies, artists, properties, websites, bookmarks, templates, and even presented as PHP classes. Surely one or some of these will be beneficial for at least one of your projects.

Portfolio:
1. http://www.ashbluewebdesign.com/2010/09/wordpress-portfolio-tutorial-custom-post-types/
2. http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/
3. http://www.wpcode.net/how-to-create-wordpress-custom-post-type-1.html/ && http://www.wpcode.net/how-to-create-wordpress-custom-post-type-2.html/
4. http://www.astronautdesigns.com/2010/06/wordpress-3-custom-post-types/
5. http://www.vooshthemes.com/blog/wordpress-tip/create-a-professional-portfolio-using-wordpress-3-0-custom-post-types/
6. http://pippinspages.com/tutorials/stellar-wordpress-portfolio-control-with-custom-post-meta-types/
7. http://redlettersstudio.com/blog/2010/11/29/customizing-wordpress-part-three/

Events:
1. http://www.noeltock.com/web-design/wordpress/custom-post-types-events-pt1/ && http://www.noeltock.com/web-design/wordpress/how-to-custom-post-types-for-events-pt-2/
2. http://wptheming.com/2010/08/how-to-make-an-events-custom-post-type/
3. http://www.problogdesign.com/wordpress/events-list-with-custom-post-types-and-taxonomies/
4. http://headwaythemes.com/tutorials/how-to-create-an-events-page-with-custom-post-types/
5. http://www.designjuices.co.uk/2010/06/tutorial-wordpress-custom-post-types/
6. http://cmstutorials.org/tutorial/view/events_list_with_custom_post_types_and_taxonomies
7. http://sixrevisions.com/wordpress/wordpress-custom-post-types-guide/

Gallery
1. http://www.morgadinho.org/2011/03/01/skeleton-custom-post-type-week4/
2. http://shibashake.com/wordpress-theme/add-custom-post-type-columns & http://shibashake.com/wordpress-theme/modify-custom-post-type-icons & http://shibashake.com/wordpress-theme/add-metabox-custom-post-type

Photo
1. http://wordpress.stackexchange.com/questions/639/creating-an-image-centric-custom-post-type

Podcasts:
1. http://kovshenin.com/archives/extending-custom-post-types-in-wordpress-3-0/
2. http://eastbaywp.com/2010/09/september-2010-meetup-slides-custom-post-type-case-study-podcast/

FAQ:
1. http://net.tutsplus.com/tutorials/wordpress/creating-an-interactive-faq-with-wordpress-and-jquery-ui/ & http://www.code-pal.com/how-to-create-a-faq-page-with-wordpress-and-custom-post-types/ && http://www.freewebgallerys.com/2010/12/04/create-faq-page-wordpress-custom-post-types/

Movies:
1. http://wpengineer.com/1969/impressions-of-custom-post-type/
2. http://mikedance.com/2011/03/how-to-create-custom-post-type-archives-in-wordpress-3-1/

Videos:
1. http://wpworks.wordpress.com/2011/02/15/wordpress-custom-post-types-registering-and-displaying-in-a-very-easy-way/
2. http://wordpress.stackexchange.com/questions/737/implementing-video-of-the-day-feature
3. http://www.andrewdodson.net/2011/02/add-video-embed-meta-boxes-to-custom-post-type/

Client Quotes/Praise
1. http://redlettersstudio.com/blog/2010/07/12/practical-use-case-for-custom-post-types/
2. http://www.amberweinberg.com/working-with-wordpress-3-0s-custom-post-types/

Newsletter
1. http://www.re-cycledair.com/wordpress-3-custom-post-type-tutorial

Products
1. http://net.tutsplus.com/tutorials/wordpress/rock-solid-wordpress-3-0-themes-using-custom-post-types/
2. http://www.bernskiold.com/2010/11/15/adding-your-own-custom-post-type/

Before/After Images:
1. http://sicdigital.com/2010/07/create-custom-post-type-for-image-upload-wordpress3/

Books:
1. http://new2wp.com/pro/wordpress-custom-post-types-and-taxonomies-done-right/

Dogs:
1. http://www.noeltock.com/web-design/wordpress/tutorial-custom-post-types/

Recipes:
1. http://wpmu.org/easy-guide-to-displaying-custom-post-types-in-your-wordpress-theme/

Coupons
1. http://www.catswhocode.com/blog/how-to-create-a-side-blog-with-wordpress-3-0

Cars
1. http://heinencreative.com/archives/tutorials/creating-custom-post-types-in-wordpress-3-0/

Zombies:
1. http://www.slideshare.net/williamsba/custom-post-types-and-taxonomies-in-wordpress && http://www.slideshare.net/williamsba/surviving-the-zombie-apocalypse-using-custom-post-types-and-taxonomies-8058659

Artists:
1. http://www.kinocreative.co.uk/tutorials/using-wordpress-custom-post-types-and-taxonomies/

Properties
1. http://www.wordpresswise.com/custom-post-types-taxonomies-templates-with-a-lightbox-513
2. https://wpsmith.net/genesis/how-to-utilize-agentpresss-settings-custom-fields-in-a-separate-post-type/

Website
1. http://www.wpmayor.com/posts/step-by-step/ultimate-guide-wordpress-custom-post-types/

Bookmarks
1. https://github.com/mfields/mfields-bookmarks

Templates:
1. http://www.wpreso.com/blog/tutorials/2011/02/24/add-multiple-custom-post-types-quickly-and-easily/
2. http://www.wpinsideout.com/your-own-custom-post-types

Class:
1. http://somadesign.ca/projects/smarter-custom-post-types/
2. Links: http://curtishenson.com/wordpress-custom-post-types-and-meta-boxes-example/

Written by Travis Smith · Categorized: Custom Post Types

Jun 11 2011

Filter Hidden Metaboxes

So I don't lose this, I wanted to post this. To filter the default hidden meta boxes, use this code in functions.php:

[php]add_filter('default_hidden_meta_boxes', 'be_hidden_meta_boxes', 2);
function be_hidden_meta_boxes($hidden, $screen) {
if ( 'post' == $screen->base || 'page' == $screen->base )
$hidden = array('slugdiv', 'trackbacksdiv', 'postexcerpt', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');
// removed 'postcustom',
return $hidden;
}[/php]

Written by Travis Smith · Categorized: Tutorials, WordPress

Jun 10 2011

Gravity Forms Snippets for Me to Remember

How to add a custom predefined choice list for Gravity Forms
[php]// Add Custom Predefined Choice list for Gravity Forms
add_filter("gform_predefined_choices", "add_predefined_choice");
function add_predefined_choice($choices){
$choices["US/Canadian Regions"] = array("Virginia", "Augusta", "XXXX");
return $choices;
}[/php]

To get an editor (similar to TinyMCE) for paragraph text fields in GF:

  1. copy this code into an HTML block on a GF form
  2. [html]
    <script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
    <script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>[/html]

  3. That's it!

NOTE - this will not work for paragraph fields set to conditional.

Written by Travis Smith · Categorized: Plugins

Jun 10 2011

Helpful Links

Understanding WordPress Custom Post Types

Here are some helpful links to further understand custom post types. Next week, we will be diving into the world of Custom Post Type Plugins.

  1. WordPress Codex: Custom Post Types
  2. WordPress Codex: Register Post Type
  3. Justin Tadlock: Custom Post Types in WordPress
  4. Justin Tadlock: Meta Capabilities (arguments capabilities and capability_type) for Custom Post Types
  5. Kovshenin: Custom Post Types in WordPress 3.0 and Kovshenin: Extending Custom Post Types in WordPress 3.0 by Konstantin
  6. WPSmith: How to Create a WordPress Custom Post Type Template in the Genesis Framework
  7. WP Inside-Out: Advanced Custom Post Types – PHP Class Integration
  8. WP Theming: Custom Post Type Resources
  9. WP Theming: How to Add a Metabox to a Custom Post Type
  10. Justin Tadlock: Showing Custom Post Types On Your Home Blog Page
  11. Justin Tadlock: Meta Capabilities for Custom Post Types
  12. Justin Tadlock: Linking Terms to a Specific Post
  13. WP Engineer's Impressions of Custom Post Types
  14. FLD Trace: WordPress custom post types, custom back-end columns and post thumbnails
  15. Nielsen Creative Media: How to Develop a Custom Post Plugin with Unique Taxonomy and Tags
  16. Justin Tadlock: Rethinking How News Themes Work
  17. Blogcastor: Submit Post Form for WordPress Custom Post Type
  18. D Baines: WordPress Custom Post Type Search

Written by Travis Smith · Categorized: Custom Post Types

Jun 09 2011

BONUS: Adding a Taxonomy Filter to Your Admin List for a Custom Post Type

Understanding WordPress Custom Post Types
Recently, a friend sent some code over to me, and I thought it would be hugely beneficial for all to see it, especially in this series. For a custom post type that could have a lot of posts (like books) it proves priceless. You can find the original code here.

[php]
// Adding a Taxonomy Filter to Admin List for a Custom Post Type
add_action( 'restrict_manage_posts', 'my_restrict_manage_posts' );
function my_restrict_manage_posts() {

// only display these taxonomy filters on desired custom post_type listings
global $typenow;
if ($typenow == 'books_ibm') {

// create an array of taxonomy slugs you want to filter by - if you want to retrieve all taxonomies, could use get_taxonomies() to build the list
$filters = array('genre', 'writer');

foreach ($filters as $tax_slug) {
// retrieve the taxonomy object
$tax_obj = get_taxonomy($tax_slug);
$tax_name = $tax_obj->labels->name;

// output html for taxonomy dropdown filter
echo "<select name='$tax_slug' id='$tax_slug' class='postform'>";
echo "<option value=''>Show All $tax_name</option>";
generate_taxonomy_options($tax_slug,0,0);
echo "</select>";
}
}
}

function generate_taxonomy_options($tax_slug, $parent = '', $level = 0) {
$args = array('show_empty' => 1);
if(!is_null($parent)) {
$args = array('parent' => $parent);
}
$terms = get_terms($tax_slug,$args);
$tab='';
for($i=0;$i<$level;$i++){
$tab.='--';
}
foreach ($terms as $term) {
// output each select option line, check against the last $_GET to show the current option selected
echo '<option value='. $term->slug, $_GET[$tax_slug] == $term->slug ? ' selected="selected"' : '','>' .$tab. $term->name .' (' . $term->count .')</option>';
generate_taxonomy_options($tax_slug, $term->term_id, $level+1);
}

}
[/php]

Please let me know what you think!?

Written by Travis Smith · Categorized: Custom Post Types, WordPress

  • « Previous Page
  • 1
  • …
  • 36
  • 37
  • 38
  • 39
  • 40
  • …
  • 60
  • Next Page »

Need Help?

Please let us know how we can help you!

Get Help

Recommendations

Genesis WordPress Framework
Sucuri Security
Gravity Forms
GetSoliloquy
Get Envira
Scribe SEO
BackupBuddy
WordPress Video User Manuals

Recent Posts

  • Solving WordPress 5XX Server Errors on SiteGround
  • Hiding an User in the WordPress Admin
  • Custom Rewrite Rules for Custom Post Types and Taxonomies
  • WordPress JavaScript Manager Native Functions
  • Causes of WordPress Site Performance Slowdown

About Travis

As a WordPress enthusiast, developer, and speaker, Travis writes about what he learns in WordPress trying to help other WordPress travelers, beginners and enthusiasts with tutorials, explanations, & demonstrations.

  • Twitter
  • Facebook
  • LinkedIn
  • Google+
  • RSS

Copyright © 2025 � WP Smith on Genesis on Genesis Framework � WordPress � Log in