Custom Post Types--Front End
-
Upload
bill-robbins -
Category
Technology
-
view
4.098 -
download
0
description
Transcript of Custom Post Types--Front End
![Page 1: Custom Post Types--Front End](https://reader034.fdocuments.us/reader034/viewer/2022052412/55843626d8b42a56178b4863/html5/thumbnails/1.jpg)
Front End:Custom Post Types
D o S o m e t h i n g U s e f u l
![Page 2: Custom Post Types--Front End](https://reader034.fdocuments.us/reader034/viewer/2022052412/55843626d8b42a56178b4863/html5/thumbnails/2.jpg)
Staff Member Page
Commonly Requested
Not easy for non-technical users to create
Perfect situation for custom post types
![Page 3: Custom Post Types--Front End](https://reader034.fdocuments.us/reader034/viewer/2022052412/55843626d8b42a56178b4863/html5/thumbnails/3.jpg)
Create a page template
Below the loop run a query something like:
Option One
![Page 4: Custom Post Types--Front End](https://reader034.fdocuments.us/reader034/viewer/2022052412/55843626d8b42a56178b4863/html5/thumbnails/4.jpg)
Build On This
Let’s add a picture of the person:
Let’s set how much of their bio we want on the main listing page:
![Page 5: Custom Post Types--Front End](https://reader034.fdocuments.us/reader034/viewer/2022052412/55843626d8b42a56178b4863/html5/thumbnails/5.jpg)
Conditional Goodness
Display a job title only if it exists.
Looks to see if the custom field has a value. If it does, it displays that value.
Looks to see if the custom field has a value. If it does, it displays that value.
Can have multiple conditions and fallbacks.
Can have multiple conditions and fallbacks.
![Page 6: Custom Post Types--Front End](https://reader034.fdocuments.us/reader034/viewer/2022052412/55843626d8b42a56178b4863/html5/thumbnails/6.jpg)
Now We Can Tie In Our
Fields
![Page 7: Custom Post Types--Front End](https://reader034.fdocuments.us/reader034/viewer/2022052412/55843626d8b42a56178b4863/html5/thumbnails/7.jpg)
![Page 8: Custom Post Types--Front End](https://reader034.fdocuments.us/reader034/viewer/2022052412/55843626d8b42a56178b4863/html5/thumbnails/8.jpg)
A Bit OF Style
![Page 9: Custom Post Types--Front End](https://reader034.fdocuments.us/reader034/viewer/2022052412/55843626d8b42a56178b4863/html5/thumbnails/9.jpg)
Other CPT Display Options
CPT archive is now available with 3.1
Works like category archive
Call it archive-post-type-name.php
Also single-post-type-name.php
![Page 10: Custom Post Types--Front End](https://reader034.fdocuments.us/reader034/viewer/2022052412/55843626d8b42a56178b4863/html5/thumbnails/10.jpg)
About Bill Robbins
@billrobbins on Twitter
billrobbinsdesign.com
organizedthemes.com