Skip to main content

Home/ Wordpress/ Group items tagged Wordpress types custom

Rss Feed Group items tagged

Vernon Fowler

Post Types « WordPress Codex - 1 views

  • it is better if you prefix your identifier with a short namespace that identifies your plugin, theme or website that implements the custom post type. For example: acme_product or aw_product for products post type used by a hypothetical ACMEWidgets.com website
  • Namespacing your custom post type identifier will not guarantee against conflicts but will certainly minimize their likelihood.
  • Do pay close attention to not having your custom post type identifier exceed 20 characters though, as the post_type column in the database is currently a VARCHAR field of that length.
  • ...6 more annotations...
  • register_post_type( 'acme_product', array( 'labels' => array( 'name' => __( 'Products' ), 'singular_name' => __( 'Product' ) ), 'public' => true, 'has_archive' => true, ) );
  • When you namespace a custom post type identifier and still want to use a clean URL structure, you need to set the rewrite argument of the register_post_type() function. For example, assuming the ACME Widgets example from above:
  • 'rewrite' => array('slug' => 'products'),
  • Note: In some cases, the permalink structure must be updated in order for the new template files to be accessed when viewing posts of a custom post type.
  • single posts of a custom post type will use single-{post_type}.php and their archives will use archive-{post_type}.php where {post_type} is the $post_type argument of the register_post_type() function.
  • In any template file of the WordPress theme system, you can also create new queries to display posts from a specific post type. This is done via the post_type argument of the WP_Query object.
Vernon Fowler

Types Plugin - WordPress Custom Post Types and Custom Fields - 4 views

  • Types Plugin – Custom Post Types, Taxonomies and Custom Fields Types is the integrated solution for customizing WordPress. You’ll be able to create custom post types, taxonomy and custom fields – all from within the WordPress GUI.
John Pratt

WordPress custom post types on steroids tutorial - 8 views

  •  
    Great tutorial on building custom websites with custom post types in WordPress
  •  
    I can confirm this works in WordPress 3.4.2 Thanks for sharing, this is the definitive post to custom posts, it's well explained :D
  •  
    I just finished a custom post type project thanks to this articles. Very nice, Thanks for sharing.
John Pratt

How to Create Custom Post Types in WordPress - 6 views

  •  
    all about custom posts types and how to create post types, custom taxonomies, and display them by hacking your WordPress theme
1 - 11 of 11
Showing 20 items per page