Custom Post Types--Front End

Post on 19-Jun-2015

4.098 views 0 download

Tags:

description

Learn how to use custom post types on the front end of your WordPress site.

Transcript of Custom Post Types--Front End

Front End:Custom Post Types

D o S o m e t h i n g U s e f u l

Staff Member Page

Commonly Requested

Not easy for non-technical users to create

Perfect situation for custom post types

Create a page template

Below the loop run a query something like:

Option One

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:

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.

Now We Can Tie In Our

Fields

A Bit OF Style

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

About Bill Robbins

@billrobbins on Twitter

billrobbinsdesign.com

organizedthemes.com

bill@billrobbinsdesign.com