SlideShare a Scribd company logo
1 of 11
CUSTOM POST TYPE IN
WORDPRESS
By:
Junejo Naeem Ahmed
POST TYPES
• WordPress can hold and display many different types
of content.
• A single item of such a content is generally called a
post.
• although post is also a specific post type.
• Internally, all the post types are stored in the same
place, in the wp_posts database table, but are
differentiated by a column called post_type.
• WordPress 3.0 gives you the capability to add your
own custom post types and to use them in different
ways.
DEFAULT POST TYPES
• There are five post types that are readily available to
users or internally used by the WordPress installation
by default :
–
–
–
–
–

Post
Page
Attachment
Revision
Navigation menu
WHAT ACTUALLY ARE CUSTOM POST TYPES?
• By using Custom Post Types you can create a new
type of item like Posts and Pages, which will contain
a different set of data.
• It will have a new administration menu, dedicated
editing pages, custom taxonomies and many more
utilities required for full fledged publishing.
• Custom Post Types are a new set of administrative
options appearing along with the default post types
such as Posts, Pages, Attachments etc.
WHAT ACTUALLY ARE CUSTOM POST TYPES? (cont’d)
• A Custom Post Type can store any type of
information. It has a dedicated editor, media
uploader and uses the existing WordPress table
structure for ease in data management.
• The main advantage of creating custom post types
using the WordPress API is that it equips itself well
with existing themes and templates.
• Custom Post Types are also SEO friendly because of
their nifty permalinks.
WHAT ACTUALLY ARE CUSTOM POST TYPES? (cont’d)
CUSTOM POST TYPES
• Custom post types are new post types you can
create.
• A custom post type can be added to WordPress via
the register_post_type() function.
• This function allows you to define a new post type by
its labels, supported features, availability and other
specifics.
• Note that you must call register_post_type() before
the admin_menu and after the after_setup_theme
action hooks.
• A good hook to use is the init hook.
WHAT WORDPRESS CAN DO FOR YOU NOW
• You could create custom post types for books,
movies, reviews, products and so on.
• If created correctly, you can achieve the following
with a few lines of code:
• The custom post type will show up in the back end as
a separate menu item with its own post list and “add
new” page.
• Categories and tags can be made available to the
custom post type, or you can create custom
taxonomies.
WHAT WORDPRESS CAN DO FOR YOU NOW
• Apart from these, you can modify countless options,
such as where the custom post type should be
placed in the menu, should it be searchable, which
user level can access it, should it be hierarchical,
custom rewrite rules, etc.
• Custom meta boxes enable you to add additional
boxes to the edit screen of a post. They usually use
custom fields, so you could just use custom fields as
well, but by separating out some custom fields as
meta boxes, you can create a much smoother and
usable admin.
CUSTOM TAXONOMIES
• Custom Taxonomies Your regular blog posts use categories
and tags to create an organization structure.
• However, the same organization doesn’t necessarily make
sense for custom post types.
• Your blog posts could be about your “Life,” your “Thoughts” or
your “Dreams.”
• These are obviously not appropriate for products.
CUSTOM TAXONOMIES (cont’d)

More Related Content

Viewers also liked

Actividad de aprendizaje nº 02
Actividad de aprendizaje nº 02Actividad de aprendizaje nº 02
Actividad de aprendizaje nº 02
Leidi Ordinola
 

Viewers also liked (20)

C.R.A.S.H
C.R.A.S.H C.R.A.S.H
C.R.A.S.H
 
Introduction To WordPress
Introduction To WordPressIntroduction To WordPress
Introduction To WordPress
 
WordPress theme setting page
WordPress theme setting pageWordPress theme setting page
WordPress theme setting page
 
The Seagull
The SeagullThe Seagull
The Seagull
 
Doc4 sm 사용자_가이드
Doc4 sm 사용자_가이드Doc4 sm 사용자_가이드
Doc4 sm 사용자_가이드
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
개발 생산성 향상 기법 V1.2
개발 생산성 향상 기법 V1.2개발 생산성 향상 기법 V1.2
개발 생산성 향상 기법 V1.2
 
Wordpress theme development
Wordpress theme developmentWordpress theme development
Wordpress theme development
 
MIT/CSAIL OpenStack Use Cases - Hong Kong 2014
MIT/CSAIL OpenStack Use Cases - Hong Kong 2014MIT/CSAIL OpenStack Use Cases - Hong Kong 2014
MIT/CSAIL OpenStack Use Cases - Hong Kong 2014
 
Design Pattern 3
Design Pattern 3Design Pattern 3
Design Pattern 3
 
Introduction databases and MYSQL
Introduction databases and MYSQLIntroduction databases and MYSQL
Introduction databases and MYSQL
 
Design pattern 4
Design pattern 4Design pattern 4
Design pattern 4
 
Doc4SM 제품설명서
Doc4SM 제품설명서Doc4SM 제품설명서
Doc4SM 제품설명서
 
Computo
ComputoComputo
Computo
 
على قمم الجبال
على قمم الجبالعلى قمم الجبال
على قمم الجبال
 
Фотоотчет Великий Новгород, ООО "Империя", разрешительная документация
Фотоотчет Великий Новгород, ООО "Империя", разрешительная документацияФотоотчет Великий Новгород, ООО "Империя", разрешительная документация
Фотоотчет Великий Новгород, ООО "Империя", разрешительная документация
 
Orixenes do galego raúl rañó 1bach a
Orixenes do galego raúl rañó 1bach aOrixenes do galego raúl rañó 1bach a
Orixenes do galego raúl rañó 1bach a
 
Баги на босов вормиксе
Баги на босов вормиксеБаги на босов вормиксе
Баги на босов вормиксе
 
La wep perfect
La wep perfectLa wep perfect
La wep perfect
 
Actividad de aprendizaje nº 02
Actividad de aprendizaje nº 02Actividad de aprendizaje nº 02
Actividad de aprendizaje nº 02
 

Similar to Wordpress custom-posttype

Complete manual for_teachers
Complete manual for_teachersComplete manual for_teachers
Complete manual for_teachers
Wanalift
 
Custom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp MontrealCustom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp Montreal
Joey Kudish
 
WordPress Custom Post Types
WordPress Custom Post TypesWordPress Custom Post Types
WordPress Custom Post Types
Mark Jaquith
 
Workshop: Creating your first WordPress plugin
Workshop: Creating your first WordPress pluginWorkshop: Creating your first WordPress plugin
Workshop: Creating your first WordPress plugin
ylefebvre
 

Similar to Wordpress custom-posttype (20)

Add Custom Post Types to Your WordPress Website
Add Custom Post Types to Your WordPress WebsiteAdd Custom Post Types to Your WordPress Website
Add Custom Post Types to Your WordPress Website
 
Complete manual for_teachers
Complete manual for_teachersComplete manual for_teachers
Complete manual for_teachers
 
The Flexibility of WordPress
The Flexibility of WordPressThe Flexibility of WordPress
The Flexibility of WordPress
 
Custom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp MontrealCustom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp Montreal
 
Newspapers with WordPress
Newspapers with WordPressNewspapers with WordPress
Newspapers with WordPress
 
WordPress can do that?!
WordPress can do that?!WordPress can do that?!
WordPress can do that?!
 
Introduction to Wordpress
Introduction to WordpressIntroduction to Wordpress
Introduction to Wordpress
 
How to Use Wordpress (for Writers and Bloggers)
How to Use Wordpress (for Writers and Bloggers)How to Use Wordpress (for Writers and Bloggers)
How to Use Wordpress (for Writers and Bloggers)
 
Custom Post Types and Taxonomies
Custom Post Types and TaxonomiesCustom Post Types and Taxonomies
Custom Post Types and Taxonomies
 
WordPress 3 Custom Post Types
WordPress 3 Custom Post TypesWordPress 3 Custom Post Types
WordPress 3 Custom Post Types
 
Chapter 6 the django admin site
Chapter 6  the django admin siteChapter 6  the django admin site
Chapter 6 the django admin site
 
Webiny CMS Starter Guide
Webiny CMS Starter GuideWebiny CMS Starter Guide
Webiny CMS Starter Guide
 
WordPress Custom Post Types
WordPress Custom Post TypesWordPress Custom Post Types
WordPress Custom Post Types
 
Word press training
Word press trainingWord press training
Word press training
 
WordPress A CMS for Beginners, Geeks and Those In-Between
WordPress A CMS for Beginners, Geeks and Those In-BetweenWordPress A CMS for Beginners, Geeks and Those In-Between
WordPress A CMS for Beginners, Geeks and Those In-Between
 
WordPress Custom Post Types
WordPress Custom Post TypesWordPress Custom Post Types
WordPress Custom Post Types
 
Basic wordpress editing
Basic wordpress editingBasic wordpress editing
Basic wordpress editing
 
9 Essential Wordpress Plugins for a Professional Wordpress Blog
9 Essential Wordpress Plugins for a Professional Wordpress Blog9 Essential Wordpress Plugins for a Professional Wordpress Blog
9 Essential Wordpress Plugins for a Professional Wordpress Blog
 
Guide to using wordpress
Guide to using wordpressGuide to using wordpress
Guide to using wordpress
 
Workshop: Creating your first WordPress plugin
Workshop: Creating your first WordPress pluginWorkshop: Creating your first WordPress plugin
Workshop: Creating your first WordPress plugin
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
EADTU
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 

Recently uploaded (20)

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfDiuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptxMichaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
PUBLIC FINANCE AND TAXATION COURSE-1-4.pdf
PUBLIC FINANCE AND TAXATION COURSE-1-4.pdfPUBLIC FINANCE AND TAXATION COURSE-1-4.pdf
PUBLIC FINANCE AND TAXATION COURSE-1-4.pdf
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 

Wordpress custom-posttype

  • 1. CUSTOM POST TYPE IN WORDPRESS By: Junejo Naeem Ahmed
  • 2. POST TYPES • WordPress can hold and display many different types of content. • A single item of such a content is generally called a post. • although post is also a specific post type. • Internally, all the post types are stored in the same place, in the wp_posts database table, but are differentiated by a column called post_type. • WordPress 3.0 gives you the capability to add your own custom post types and to use them in different ways.
  • 3. DEFAULT POST TYPES • There are five post types that are readily available to users or internally used by the WordPress installation by default : – – – – – Post Page Attachment Revision Navigation menu
  • 4. WHAT ACTUALLY ARE CUSTOM POST TYPES? • By using Custom Post Types you can create a new type of item like Posts and Pages, which will contain a different set of data. • It will have a new administration menu, dedicated editing pages, custom taxonomies and many more utilities required for full fledged publishing. • Custom Post Types are a new set of administrative options appearing along with the default post types such as Posts, Pages, Attachments etc.
  • 5. WHAT ACTUALLY ARE CUSTOM POST TYPES? (cont’d) • A Custom Post Type can store any type of information. It has a dedicated editor, media uploader and uses the existing WordPress table structure for ease in data management. • The main advantage of creating custom post types using the WordPress API is that it equips itself well with existing themes and templates. • Custom Post Types are also SEO friendly because of their nifty permalinks.
  • 6. WHAT ACTUALLY ARE CUSTOM POST TYPES? (cont’d)
  • 7. CUSTOM POST TYPES • Custom post types are new post types you can create. • A custom post type can be added to WordPress via the register_post_type() function. • This function allows you to define a new post type by its labels, supported features, availability and other specifics. • Note that you must call register_post_type() before the admin_menu and after the after_setup_theme action hooks. • A good hook to use is the init hook.
  • 8. WHAT WORDPRESS CAN DO FOR YOU NOW • You could create custom post types for books, movies, reviews, products and so on. • If created correctly, you can achieve the following with a few lines of code: • The custom post type will show up in the back end as a separate menu item with its own post list and “add new” page. • Categories and tags can be made available to the custom post type, or you can create custom taxonomies.
  • 9. WHAT WORDPRESS CAN DO FOR YOU NOW • Apart from these, you can modify countless options, such as where the custom post type should be placed in the menu, should it be searchable, which user level can access it, should it be hierarchical, custom rewrite rules, etc. • Custom meta boxes enable you to add additional boxes to the edit screen of a post. They usually use custom fields, so you could just use custom fields as well, but by separating out some custom fields as meta boxes, you can create a much smoother and usable admin.
  • 10. CUSTOM TAXONOMIES • Custom Taxonomies Your regular blog posts use categories and tags to create an organization structure. • However, the same organization doesn’t necessarily make sense for custom post types. • Your blog posts could be about your “Life,” your “Thoughts” or your “Dreams.” • These are obviously not appropriate for products.