1. Custom post types allow users to create different content types like recipes, videos, or events within WordPress rather than just blog posts. 2. They provide more flexibility than plugins and make WordPress more of a true CMS. 3. The code to create a custom post type for recipes was demonstrated, including arguments like labels, supports, and hierarchical settings.
Keith Devon gives a presentation to the WordPress London group about custom post types in WordPress.
For video and article, see http://keithdevon.com/2011/tuts/custom-post-types/.
Have you ever used a theme or a plugin that offers an additional content area outside of the standard Posts or Pages? These are called Custom Post Types, a great feature in WordPress that allows you to break out into specific areas of content that can be used for anything the mind can imagine.
Whether you are learning about theme development and want to add separate content sections of your own or simply new to using WordPress to manage your content, it is to your advantage to know and understand what custom post types are, and what they can do to simplify your publishing or development life.
This presentation was given at WordCamp Ottawa on April 27th, 2013
Web Safe Fonts are Dead Series | Part 1: Web Typography ReincarnatedExtensis
Thomas Phinney introduces web fonts, covers font selection and combination, and also includes:
• How and why mobile devices and iOS have killed off web safe fonts
• Best practices for picking and combining individual typefaces
• On-screen text rendering differences
• Creative inspiration for designing with web fonts in Adobe® Photoshop®
Using WordPress as a content management system in higher education, as shown at the CASE District IV conference in Austin, Texas on March 29, 2010. Be sure to grab the associated handouts:
http://sillybean.net/downloads/case/plugin-handout.pdf
http://sillybean.net/downloads/case/profile-handout.pdf
http://sillybean.net/downloads/case/feed-handout.pdf
Add Custom Post Types to Your WordPress WebsiteDustin Hartzler
Learn how to add custom post types to your WordPress website.
For the full replay, please see: http://yourwebsiteengineer.com/webinars/add-custom-post-types-to-your-wordpress-website
Keith Devon gives a presentation to the WordPress London group about custom post types in WordPress.
For video and article, see http://keithdevon.com/2011/tuts/custom-post-types/.
Have you ever used a theme or a plugin that offers an additional content area outside of the standard Posts or Pages? These are called Custom Post Types, a great feature in WordPress that allows you to break out into specific areas of content that can be used for anything the mind can imagine.
Whether you are learning about theme development and want to add separate content sections of your own or simply new to using WordPress to manage your content, it is to your advantage to know and understand what custom post types are, and what they can do to simplify your publishing or development life.
This presentation was given at WordCamp Ottawa on April 27th, 2013
Web Safe Fonts are Dead Series | Part 1: Web Typography ReincarnatedExtensis
Thomas Phinney introduces web fonts, covers font selection and combination, and also includes:
• How and why mobile devices and iOS have killed off web safe fonts
• Best practices for picking and combining individual typefaces
• On-screen text rendering differences
• Creative inspiration for designing with web fonts in Adobe® Photoshop®
Using WordPress as a content management system in higher education, as shown at the CASE District IV conference in Austin, Texas on March 29, 2010. Be sure to grab the associated handouts:
http://sillybean.net/downloads/case/plugin-handout.pdf
http://sillybean.net/downloads/case/profile-handout.pdf
http://sillybean.net/downloads/case/feed-handout.pdf
Add Custom Post Types to Your WordPress WebsiteDustin Hartzler
Learn how to add custom post types to your WordPress website.
For the full replay, please see: http://yourwebsiteengineer.com/webinars/add-custom-post-types-to-your-wordpress-website
Custom Post Types in Depth at WordCamp MontrealJoey Kudish
Since WordPress 3.0 added Custom Post Types, WordPress has become a truly powerful and extensible Content Management System for any need. In this talk we’ll review the what, why and how of custom post types. If you’ve been meaning to learn beyond the basics of Custom Post Types, now is the time!
Starting with what CPTs are and how they’re used, we’ll explain how to register/create them as well as how make them most of them in your themes and plugins. We’ll discuss the Custom Post Types API as well as its shortcomings, and consider various UI-based CPT plugins and their pros and cons as well other innovative approaches. Custom Post Types are the future of WordPress, don’t miss out!
Basic knowledge of WordPress coding standards & PHP. HTML/CSS helpful but not required.
About Colin and Joachim
Co-founder of stresslimit, Colin has consulted on, architected and developed CMS platforms, intranets, applications and websites of all shapes & sizes for over a decade. Having watched the WordPress project be born, grow & develop, he now champions the simplicity and extensibility of the world’s most popular blogging (and now CMS) platform. Follow @stresslimit on Twitter.
Joachim created his first website at the age of 11. Ever since, he’s been passionate about all things web and has given himself the technical know-how to develop websites. In 2008, he tried out WordPress, and fell in love with the platform, and is happy to have seen it grow to where it is today. Referred to as the “WordPress guru” in the office, Joachim is now one of the lead developers at stresslimit, as well as a WordPress freelance developer. Follow @jkudish on Twitter.
WordPress Code Architecture - revising the code architecture of the WordPress CMS and comparing it to the design patterns and core decisions in other CMS and frameworks based on PHP, Python, Ruby, Java and C#.
Presented at WordCamp Malaysia 2010.
Slideshare also does not resize my cropped images properly, thus resulting in squished images. This is noticeable on my squished code.
Emerald Coast WordPress Meetup presentation slides.
Firestorm Creative Studios explains how using custom post types in WordPress can help you better organize and structure your content and by using a simple plugin, you can also for relationships between post types. When creating content assets on your website, be sure that you offer the best user experience possible so that your content marketing efforts get the maximum benefit. Better and more logical content organization also allows search engines to better interpret what your content pages are about and reward you with better search relevance and rankings.
www.Firestormcs.com
In this advanced development session we will review how to create structured data for your WordPress website by using Custom Post Types, Custom Taxonomies, and Custom Fields.
This presentation was part of the Wharton Web Conference: whartonwebconf.com
We all know that WordPress is an awesome blogging platform, but under that bloggy exterior lurks a fully operational Content Management System.
During this presentation we take a look at some sites you might not think run on WordPress, install a bunch of plugins to make WordPress an even better CMS, learn what Custom Post Types and Taxonomies are and how to use them, plus cover custom menus and conditional widgets.
Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...Evan Mullins
WordPress is for more than just blogging. Create and manage more types of content, like a portfolio, events, testimonials, images, people, cats anything you can think of you’d like to have a website about. Learn how to add content types like they were built in.
Using Custom Post Types and Advanced Custom Fields with ElementorAngela Bowman
Get links via Google Slides here: https://docs.google.com/presentation/d/1-UWzXnAbXlYfx647SLYoPyOfb6TRgzWJZZxLGgKI5e4/edit?usp=sharing
------------
Elementor Pro is required to create single post and archive templates.
What is a custom post type and custom taxonomy?
Why use CPT UI plugin?
What are custom fields?
How do you create custom fields?
What is a Theme Builder template?
How is a Theme Builder template different than editing a single page with Elementor?
What are the Display Conditions for Elementor templates?
What is a loop? Why do you need custom loops? Where do you use loops?
When you do you need to use conditional visibility?
This session guides you through the process of creating and updating custom post types in Wordpress. This feature allows you to fully leverage the customization possible in this awesome CMS.
Custom Post Types in Depth at WordCamp MontrealJoey Kudish
Since WordPress 3.0 added Custom Post Types, WordPress has become a truly powerful and extensible Content Management System for any need. In this talk we’ll review the what, why and how of custom post types. If you’ve been meaning to learn beyond the basics of Custom Post Types, now is the time!
Starting with what CPTs are and how they’re used, we’ll explain how to register/create them as well as how make them most of them in your themes and plugins. We’ll discuss the Custom Post Types API as well as its shortcomings, and consider various UI-based CPT plugins and their pros and cons as well other innovative approaches. Custom Post Types are the future of WordPress, don’t miss out!
Basic knowledge of WordPress coding standards & PHP. HTML/CSS helpful but not required.
About Colin and Joachim
Co-founder of stresslimit, Colin has consulted on, architected and developed CMS platforms, intranets, applications and websites of all shapes & sizes for over a decade. Having watched the WordPress project be born, grow & develop, he now champions the simplicity and extensibility of the world’s most popular blogging (and now CMS) platform. Follow @stresslimit on Twitter.
Joachim created his first website at the age of 11. Ever since, he’s been passionate about all things web and has given himself the technical know-how to develop websites. In 2008, he tried out WordPress, and fell in love with the platform, and is happy to have seen it grow to where it is today. Referred to as the “WordPress guru” in the office, Joachim is now one of the lead developers at stresslimit, as well as a WordPress freelance developer. Follow @jkudish on Twitter.
WordPress Code Architecture - revising the code architecture of the WordPress CMS and comparing it to the design patterns and core decisions in other CMS and frameworks based on PHP, Python, Ruby, Java and C#.
Presented at WordCamp Malaysia 2010.
Slideshare also does not resize my cropped images properly, thus resulting in squished images. This is noticeable on my squished code.
Emerald Coast WordPress Meetup presentation slides.
Firestorm Creative Studios explains how using custom post types in WordPress can help you better organize and structure your content and by using a simple plugin, you can also for relationships between post types. When creating content assets on your website, be sure that you offer the best user experience possible so that your content marketing efforts get the maximum benefit. Better and more logical content organization also allows search engines to better interpret what your content pages are about and reward you with better search relevance and rankings.
www.Firestormcs.com
In this advanced development session we will review how to create structured data for your WordPress website by using Custom Post Types, Custom Taxonomies, and Custom Fields.
This presentation was part of the Wharton Web Conference: whartonwebconf.com
We all know that WordPress is an awesome blogging platform, but under that bloggy exterior lurks a fully operational Content Management System.
During this presentation we take a look at some sites you might not think run on WordPress, install a bunch of plugins to make WordPress an even better CMS, learn what Custom Post Types and Taxonomies are and how to use them, plus cover custom menus and conditional widgets.
Custom post types- Choose Your Own Adventure - WordCamp Atlanta 2014 - Evan M...Evan Mullins
WordPress is for more than just blogging. Create and manage more types of content, like a portfolio, events, testimonials, images, people, cats anything you can think of you’d like to have a website about. Learn how to add content types like they were built in.
Using Custom Post Types and Advanced Custom Fields with ElementorAngela Bowman
Get links via Google Slides here: https://docs.google.com/presentation/d/1-UWzXnAbXlYfx647SLYoPyOfb6TRgzWJZZxLGgKI5e4/edit?usp=sharing
------------
Elementor Pro is required to create single post and archive templates.
What is a custom post type and custom taxonomy?
Why use CPT UI plugin?
What are custom fields?
How do you create custom fields?
What is a Theme Builder template?
How is a Theme Builder template different than editing a single page with Elementor?
What are the Display Conditions for Elementor templates?
What is a loop? Why do you need custom loops? Where do you use loops?
When you do you need to use conditional visibility?
This session guides you through the process of creating and updating custom post types in Wordpress. This feature allows you to fully leverage the customization possible in this awesome CMS.
TypeScript is a super set of JavaScript. This slide covers the key features of TypeScript including basics of typescript, basic types, Interfaces, Functions, Classes, Generics, Modules.
Wordcamp Phoenix 2012 - Custom Post Types: Now What? By Cody HelgesonCody Helgeson
http://www.fallingupmedia.com
By now a lot of us have heard about or used the amazing custom post type functionality within WordPress. But, after the code has settled from registering your very own custom post type, what do you do next? This session will focus on some of the intermediate to advanced practices and abilities to leverage custom post types to the max. You can literally build anything you can imagine with custom post type support through WordPress, and hopefully with some of the knowledge from this session, you will be armed with the tools to let your imagination and creativity run wild. So what are the topics in store?
- Adding custom taxonomies to your post type
– Brief overview of custom taxonomies
– The code
– Great Examples
- Custom admin columns for your post type
– Brief overview and why this is important
– The Code
– Great Examples
- Post type specific page templates
– How to create custom page templates for your post type
- Custom fields
– Every custom post type could use a specific custom field
– How we do it
– Oh the possibilities!
- Custom Queries
– Brief overview
– Great examples
Understanding the ins and outs of word press metadataNicholas Batik
Nov. 25 2014 Austin WordPress Meetup presentation by Nick Batik on adding metadata to WordPress. Covers use of Types, Advanced Custom Fields, and PODS, as well as editing code. Part 2 of this presentation will be on displaying the data you enter, presented by Corey Ellis from 10up.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
1. Custom Post types
in WordPress 3
Dave Zille
May 15, 2010 - WordCamp Victoria BC
2. About Dave
• President, dazil Internet Services
• WordPress dev, WordPress conversions
• web: dazil.com twitter: @dazil
• Principal, Learn it Today
• WordPress classroom and online training
• web: learnittoday.ca twitter: @learnittodayca
3. Agenda
• Custom Post Types:
• What are they? What aren’t they?
• Why do we need them?
• Custom Post Type ideas/examples
• Demo:
• Creating a custom post type
• Displaying a custom post type
• Resources
4. WordPress 3: Not just for Blogs Anymore!
The term “blog” has been
replaced with “site”
throughout
WordPress 3 is (officially)
an actual CMS!
WordPress install process
now asks for “Site Title”
7. Top 5 Reasons WP is a CMS:
1. Scalability
2. Security
8. Top 5 Reasons WP is a CMS:
1. Scalability
2. Security
3. Menu Management
9. Top 5 Reasons WP is a CMS:
1. Scalability
2. Security
3. Menu Management
4. Custom Taxonomies
10. Top 5 Reasons WP is a CMS:
1. Scalability
2. Security
3. Menu Management
4. Custom Taxonomies
5. Custom Post Types
11. What are Custom Post Types?
• Custom Post Types are “content” types
• Not to be confused with “blog post”
• Traditional “post” is actually just another Custom
Post Type
• Can be used to store and administer different
types of content on your WordPress site
• Traditionally done via plugins (Flutter, Pods, etc)
• A huge part of why WP 3 is a CMS
12. What aren’t Custom Post Types?
• Custom Post Types are not:
• A replacement for Custom Fields
• (used in conjunction with Custom Fields)
• Completely GUI driven
• (i.e. cannot be created with default WP GUI)
13. Why do we need
Custom Post Types?
• Because Custom Post Types:
• Make it easy to create and edit different
forms of content within WordPress
• Eliminate the need to “fake” custom post
types by using 3rd party plugins
• Will make you and your clients happy!
14. Custom Post Type Examples
• Media:
• Video, Podcasts
• Title,YouTube URL, Length/Duration, Captions,
Show Notes, etc
• Information:
• Car for Sale
• Make, Model, Color, Features, Pictures, etc..
15. Custom Post Type Examples
• Information (cont’d)
• Real Estate Listing
• Price, # bed, # bath, amenities, photos, etc.
• Gallery/Portfolio
• Thumbnail, description, URL, etc.
• Calendar of Events
• Date, time, cost, location, etc.
19. Your First Custom Post Type
• Case Study:
• Recipe database
• Description
20. Your First Custom Post Type
• Case Study:
• Recipe database
• Description
• Ingredients
21. Your First Custom Post Type
• Case Study:
• Recipe database
• Description
• Ingredients
• Prep Time
22. Your First Custom Post Type
• Case Study:
• Recipe database
• Description
• Ingredients
• Prep Time
• Cook Time
23. Custom Post Types: The Code
• The register_post_type() function was introduced in
WordPress 2.9
• WordPress 3 makes register_post_type() very useful
• Minimal code, and a Custom Post Type is up and running:
add_action( 'init', 'create_recipe_post_type' );
function create_recipe_post_type() {
register_post_type( 'recipe',
array(
'label' => __( 'Recipes' ),
'singular_label' => __( 'Recipe' ),
'public' => true,
)
);
}
25. Custom Post Types: The Code
• Where does the code go?
• 2 options:
• Create a plugin file, or
• add to your theme’s functions.php
26. Custom Post Types: The Code
• Where does the code go?
• 2 options:
• Create a plugin file, or
• add to your theme’s functions.php
• This is useful, but can I do more?
• The register_post_type() function has 20+ arguments
• Can control a lot about CP Types using them
• Let’s review some of them..
28. Custom Post Types: The Code
register_post_type() arguments
• label
• A plural descriptive name for the post type
• eg “Recipes”
• singular_label
• A singular descriptive name for the post type
• eg “Recipe”
30. Custom Post Types: The Code
register_post_type() arguments
• description
• A short descriptive summary of what the post type is
• eg. “A set of directions with a list of ingredients for making
or preparing food.”
• public
• Whether or not the post type should be made available in the
admin
• boolean, default: false
32. Custom Post Types: The Code
register_post_type() arguments
• menu_position
• Allows the positioning of the post type in the admin menu
• Default: a new post type is added after Comments
• menu_icon
• Allows you to specify a custom icon for the post type
• Default: posts icon
35. Custom Post Types: The Code
register_post_type() arguments
• hierarchical
36. Custom Post Types: The Code
register_post_type() arguments
• hierarchical
• Determines whether the post type is hierarchical (as in ‘pages’),
or not (as in ‘posts’)
37. Custom Post Types: The Code
register_post_type() arguments
• hierarchical
• Determines whether the post type is hierarchical (as in ‘pages’),
or not (as in ‘posts’)
• Default: false
38. Custom Post Types: The Code
register_post_type() arguments
• hierarchical
• Determines whether the post type is hierarchical (as in ‘pages’),
or not (as in ‘posts’)
• Default: false
• can_export
39. Custom Post Types: The Code
register_post_type() arguments
• hierarchical
• Determines whether the post type is hierarchical (as in ‘pages’),
or not (as in ‘posts’)
• Default: false
• can_export
• Specifies whether posts of the post type can be exportable using
WordPress’ export function
40. Custom Post Types: The Code
register_post_type() arguments
• hierarchical
• Determines whether the post type is hierarchical (as in ‘pages’),
or not (as in ‘posts’)
• Default: false
• can_export
• Specifies whether posts of the post type can be exportable using
WordPress’ export function
• Default: true
44. Custom Post Types: The Code
register_post_type() arguments
• supports
• Defines what meta boxes and other fields appear when editing
or creating a post
45. Custom Post Types: The Code
register_post_type() arguments
• supports
• Defines what meta boxes and other fields appear when editing
or creating a post
• Options: title, editor, comments, trackbacks,
revisions, author, excerpt, thumbnail, custom-
fields, page-attributes
46. Custom Post Types: The Code
register_post_type() arguments
• supports
• Defines what meta boxes and other fields appear when editing
or creating a post
• Options: title, editor, comments, trackbacks,
revisions, author, excerpt, thumbnail, custom-
fields, page-attributes
• Default: title, editor
53. Custom Post Types: Displaying
• Customizing the custom post type
template
54. Custom Post Types: Displaying
• Customizing the custom post type
template
• single.php
55. Custom Post Types: Displaying
• Customizing the custom post type
template
• single.php
• template for the custom post type (default)
56. Custom Post Types: Displaying
• Customizing the custom post type
template
• single.php
• template for the custom post type (default)
• single-post_type_name.php
57. Custom Post Types: Displaying
• Customizing the custom post type
template
• single.php
• template for the custom post type (default)
• single-post_type_name.php
• custom template for the custom post type
58. Custom Post Types: Displaying
• Customizing the custom post type
template
• single.php
• template for the custom post type (default)
• single-post_type_name.php
• custom template for the custom post type
• eg. single-recipe.php
60. Custom Post Types: Displaying
• Displaying custom post types on your site’s
homepage
61. Custom Post Types: Displaying
• Displaying custom post types on your site’s
homepage
• Add to your theme’s functions.php:
62. Custom Post Types: Displaying
• Displaying custom post types on your site’s
homepage
• Add to your theme’s functions.php:
add_filter( 'pre_get_posts', 'my_get_posts' );
63. Custom Post Types: Displaying
• Displaying custom post types on your site’s
homepage
• Add to your theme’s functions.php:
add_filter( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query ) {
64. Custom Post Types: Displaying
• Displaying custom post types on your site’s
homepage
• Add to your theme’s functions.php:
add_filter( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query ) {
if ( is_home() )
65. Custom Post Types: Displaying
• Displaying custom post types on your site’s
homepage
• Add to your theme’s functions.php:
add_filter( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query ) {
if ( is_home() )
$query->set( 'post_type', array( 'post', 'recipe' ) );
66. Custom Post Types: Displaying
• Displaying custom post types on your site’s
homepage
• Add to your theme’s functions.php:
add_filter( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query ) {
if ( is_home() )
$query->set( 'post_type', array( 'post', 'recipe' ) );
return $query;
67. Custom Post Types: Displaying
• Displaying custom post types on your site’s
homepage
• Add to your theme’s functions.php:
add_filter( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query ) {
if ( is_home() )
$query->set( 'post_type', array( 'post', 'recipe' ) );
return $query;
}
70. Other Custom Post Type Functions
• Get the “post type” of a post:
• get_post_type() allows you to check the post type of a
specific post
71. Other Custom Post Type Functions
• Get the “post type” of a post:
• get_post_type() allows you to check the post type of a
specific post
$post_type = get_post_type($post_id);
72. Other Custom Post Type Functions
• Get the “post type” of a post:
• get_post_type() allows you to check the post type of a
specific post
$post_type = get_post_type($post_id);
• Check if a post is of a specific type:
73. Other Custom Post Type Functions
• Get the “post type” of a post:
• get_post_type() allows you to check the post type of a
specific post
$post_type = get_post_type($post_id);
• Check if a post is of a specific type:
• is_post_type() allows you to check a specific post against
a specific post type
74. Other Custom Post Type Functions
• Get the “post type” of a post:
• get_post_type() allows you to check the post type of a
specific post
$post_type = get_post_type($post_id);
• Check if a post is of a specific type:
• is_post_type() allows you to check a specific post against
a specific post type
if ( is_post_type( 'recipe', $post_id ) )
75. Other Custom Post Type Functions
• Get the “post type” of a post:
• get_post_type() allows you to check the post type of a
specific post
$post_type = get_post_type($post_id);
• Check if a post is of a specific type:
• is_post_type() allows you to check a specific post against
a specific post type
if ( is_post_type( 'recipe', $post_id ) )
echo 'This is a not a blog post. It is a recipe.';
76. Other Custom Post Type Functions
• Get the “post type” of a post:
• get_post_type() allows you to check the post type of a
specific post
$post_type = get_post_type($post_id);
• Check if a post is of a specific type:
• is_post_type() allows you to check a specific post against
a specific post type
if ( is_post_type( 'recipe', $post_id ) )
echo 'This is a not a blog post. It is a recipe.';
else
77. Other Custom Post Type Functions
• Get the “post type” of a post:
• get_post_type() allows you to check the post type of a
specific post
$post_type = get_post_type($post_id);
• Check if a post is of a specific type:
• is_post_type() allows you to check a specific post against
a specific post type
if ( is_post_type( 'recipe', $post_id ) )
echo 'This is a not a blog post. It is a recipe.';
else
echo 'This is not a recipe.';
78. Resources
• WordPress.org Codex: register_post_type function reference:
• http://codex.wordpress.org/Function_Reference/register_post_type
• Blog post: Custom post types in WordPress:
• http://justintadlock.com/archives/2010/04/29/custom-post-types-in-
wordpress
• Blog post: First impressions of custom post type:
• http://wpengineer.com/impressions-of-custom-post-type/
• Plugin: Custom post type UI plugin for WordPress
• http://www.strangework.com/2010/03/03/custom-post-type-ui-plugin-for-
wordpress/