nhat nguyen - custom post type

20
How to use Types Plugin Custom Post Type - Custom Taxonomy - Custom Fields Email: [email protected] - Webstie:http ://nhatdesign.com Presented by Nguyen Tran Vinh Nhat

Upload: nhat-cisco

Post on 21-Jun-2015

442 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Nhat Nguyen - Custom Post Type

How to use Types Plugin Custom Post Type - Custom Taxonomy - Custom Fields

Email: [email protected] - Webstie:http://nhatdesign.comPresented by Nguyen Tran Vinh Nhat

Development Website at Panpages Viet Nam

Page 2: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 2

OUTLINE

1. Definition of Post Type and Features

2. Installation Instructions

3. Guide to display all products

4. Guide to display product in detail

5. Q & A

Page 3: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 3

What is Post Type ?

Page 4: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 4

• Post (Post Type: 'post')

• Page (Post Type: 'page')

• Attachment (Post Type: 'attachment')

• Revision (Post Type: 'revision')

• Navigation menu (Post Type: 'nav_menu_item')

Document: http://codex.wordpress.org/Post_Types

Default Post Types

Page 5: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 5

Features• Custom Types & Taxonomy

• Custom fields

• User Fields

• Creating Post Type Relationships

• Access Features - $39 (USD)

Page 6: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 6

Easy to use

  Suitable for everyone

  Fully supported features

Strong community support

Why do we use Types Plugin?

Page 7: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 7

Page 8: Nhat Nguyen - Custom Post Type

8

page-banh-kem.php

single-banh-kem.php

style.css

Types Plugin WordPress

Page 9: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 9

1. Create Post TypeTypes -> Custom Types And Taxonomies -> Add Custom Post Type

Page 10: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 10

Page 11: Nhat Nguyen - Custom Post Type

11

Types -> Custom Types and Taxonomies -> Add Custom Taxonomies

2. Create Custom Taxonomies

Page 12: Nhat Nguyen - Custom Post Type

12

Types -> Custom Fields -> Add A Custom Fields Group

3. Create Custom Field

Page 13: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 13

Document:http://wp-types.com/documentation/functions/#tf-150543

Page 14: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 14

1. Create Template Page with post type

Code: http://pastebin.com/M26aAHNuCss:http://pastebin.com/A1yVQ6wd

Page 15: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 15

2. Create product details Tips:

First, you need to copy content file single.php to file single-san-pham.php that you created to give it structure that fits the theme you are using.

File single.php form should be written as single-{slug}.php. It will be applied to the corresponding post type slug. For example, file single-banh-kem.php will apply for the post type details banh-kem.

Page 16: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 16

Code :http://pastebin.com/ryUqVBAJ

Page 17: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 17

• Custom Post Type Generator – Allows you to create custom quick post type by selecting a number of options available and the whole code will be provided to you. You only have to copy and paste the provided code into functions.php or plugin file in particular and the process is finished.

• Custom Post Type UI - Free plugin for creating custom quick post type directly in WP-Admin.

In addition, we also have 2 other plugin created post types:

Page 19: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 19

Page 20: Nhat Nguyen - Custom Post Type

Types Plugin - Nguyễn Trần Vĩnh Nhật 20

THANKS YOU !!!