Custom Post Type Template - Create One To To Customize Designs

Thanks! Share it with your friends!

URL

You disliked this video. Thanks for the feedback!

Sorry, only registred users can create playlists.

ULTRAFAST, CHEAP, SCALABLE AND RELIABLE! WE STRONGLY RECOMMEND ACCU WEB HOSTING COMPANY

Custom Post Type Template - Create One To To Customize Designs

Watch Wordpress WPLearningLab Video: Custom Post Type Template - Create One To To Customize Designs. Custom Post Type Template - Create One To To Customize Designs https://youtu.be/qkQliLkXH20

Grab your free 17-Point WordPress Pre-Launch PDF Checklist: http://vid.io/xqRL

Download your exclusive 10-Point WP Security Checklist: http://bit.ly/10point-wordpress-hardening-checklist

What is a WordPress custom post type template?

To answer that, let’s first start with the two post types built into WordPress: posts and pages. Posts are for blog posts and usually display on the front end along with a publication date, an author, comment count, and tags and categories. Pages on the other hand, display without any of that extra information. How post and pages display on the front end is the post type template. A custom post type template then is similar to posts and pages in that it displays content in the front end, but you as the creator of the custom post type can define what information the post editor collects and how it’s displayed on the front end for your visitors. This will make more sense as you go through this tutorial.

All of the extra information that WordPress posts display is called post metadata.

Creating custom post types templates is a two-step process.

Create the custom post type in WordPress (with or without a plugin)
Create the page template that displays the custom post type content to visitors

This tutorial will show you step 2, how to assign a template to the custom post type that displays when that post type is viewed by a visitor.

You will need to complete step 1 before you can do this tutorial. If you need to do step 1, here’s a video tutorial for creating a custom post type without a plugin. For those of you who prefer plugins, here’s a video tutorial for creating a custom post type by using a plugin.

When you’ve completed one of those two tutorials come back to this tutorial and learn how to assign a specific WordPress custom post type template to the custom post type.

Find The Custom Post Type Name
The process starts in the dashboard.

We need to find the name of our custom post type. For instance, I have a custom post type named Products in the left-side admin menu.

When I click on the Products custom post type and the URL will change to this:

wp-phd.com/wp-admin/edit.php?post_type=wpll_product

Yours will look similar.

The post_type is a URL parameter and wpll_product is the value of that parameter. The value is what we need for creating our WordPress custom post type template.

Here are some visual examples for clarity. The value for this example is wpll_product.

The value for this example is music.

Once you know the name of the custom post type, go to your hosting cPanel and open the file manager.

Inside the file manager navigate to wp-content, then themes, then find your active theme, and open it.

In my example, I’m using a child theme. In the child theme folder I don’t have the template files for pages or posts. The default WordPress template file for pages is always pages.php and for posts is always single.php.

Because I don’t want to work with a blank canvas, I’m going to the parent theme folder and copy the single.php file into my child theme (https://www.youtube.com/watch?v=ebGrw1h6Hog&list=PLlgSvQqMfii6X3D9S4mwM_inUYv8gq564).

To do that go into the parent theme folder, find the single.php file and right click on it. In the context menu that appears click on copy.

In the dialog box that opens enter the path to the child theme folder and click copy file(s).

Now, go back to the child theme folder.

Find the single.php that you just copied there and right-click on it. From the context menu that appears click rename.

The name of the single.php has to be single-*name of your custom post type*.php. In the first case, the name is wpll_product. So the file name for this example would be:

single-wpll_product.php

Now any page that is created in the Product custom post type will use this template to display its’ content. This might seem a little confusing at first, this video on the WordPress hierarchy (https://youtu.be/6W4Mx8lilz0) should help you wrap your head around how WordPress loads files.

Read the rest on the blog: https://wplearninglab.com/wordpress-custom-post-types/

Subscribe to this awesome channel here: http://www.youtube.com/subscription_center?add_user=wplearninglab

WordPress. How To Create A Custom Post Type. How To Create A WordPress Custom Post Type Without A Plugin. How to create a custom post type using Easy Content Types. A WordPress Custom Post Type Allows You To Organize Your Content With Your Own Custom Post Types. Cherry Framework 3. How To Change Thumbnail Image Dimensions For Custom Post Type Post Single Page. When Do You Need a Custom Post Type or Taxonomy in WordPress. Cómo crear un Custom Post Type en WordPress. How to use Custom Post Type UI Extended plugin for WordPress. CherryFramework 4. How To Change Custom Post Type Slug. Introducing Divi Builder Custom Post Type Support. WordPress Blogging Themes. How To Change Custom Post Type Slug. CherryFramework 4. How To Change Custom Post Type Labels In The Admin Panel.

Show more

Published:
Category: Wordpress WPLearningLab
134 Views

Related Videos

Free Web Hosting
RECOMMENDED WEB HOSTING

FASTCOMET

Fastcomet

HOSTGATOR

HOSTGATOR

BLUEHOST

BLUEHOST

SITEGROUND

SITEGROUND

A2 HOSTING

A2 HOSTING

HOSTINGER

HOSTINGER

DREAMHOST

DREAMHOST

ACCU WEBHOSTING

ACCU WEBHOSTING

MILESWEB

MILESWEB

HOSTPAPA

HOSTPAPA


RSS