How to Create Custom Single Post Templates in WordPress

[agentsw ua=’pc’]

Do you want to create a custom single post template in WordPress?

Custom single post templates allow you to use different layouts for your individual blog posts. Many WordPress themes come with a few different page templates, and you can also create your own if needed.

In this article, we’ll show you how to easily create custom single post templates in WordPress. We’ll share multiple methods, so you can choose one that works best for your needs.

create custom single post templates in wordpress og

Contents

When Do You Need a Custom Single Post Template?

Sometimes you may want a different look and feel for certain posts on your WordPress website. For instance, you may want to use a different layout for featured articles or stories in a particular category.

This is where you need a custom single post template in WordPress.

By default, WordPress uses the single post template based on the WordPress template hierarchy. All themes come with a single.php template, and this is used by default for all of your single posts.

Some themes may also include additional templates or layout choices that you can use.

It is very much like creating a custom page template. Most WordPress themes also come with page templates that you can use while editing a post or page in WordPress.

Choosing a Page Template

Having said that, let’s take a look at how to easily create custom single post templates in WordPress. We’ll show you multiple methods, so you can use the one that works best for you.

Creating Single Post Templates Using the Block Editor

This method does not really create a post template and is limited in flexibility. However, it is the easiest way to save your own single post layouts and then reuse them.

The default WordPress block editor comes with a built-in feature that allows you to save and reuse blocks. One such reusable block is the group block.

The group block allows you to put several blocks and entire post layouts into one group. You can then save this group block and reuse it in your other posts.

Let’s take a look at how to use the group block to save your custom post templates.

First, you need to create a new post in WordPress. After that, simply add a group block to the content area.

Add Group Block

Now you can start adding blocks into the group block to create a single post layout for your WordPress blog.

You can add any blocks you want including columns, media and text, cover images, and more.

Add Blocks to the Group

Once you are satisfied with the layout you have created, you need to take your mouse up and select the group block.

Simply click on the three-dot menu icon and then select the ‘Add to Reusable blocks’ option.

Add Reusable Block

Next, you need to provide a name for the reusable block and then click on the Save button. WordPress will now save your reusable block including all the blocks inside the group block.

You can then edit any existing post on your website or create a new one. On the post edit screen, simply click on the add new block button and look for your saved block under the ‘Reusable’ tab.

Reuse Block

Add the block to your post and WordPress will load your entire group block with all the blocks and settings as you saved them.

This method allows you to save your custom layouts. However, it does not allow you to change how your theme handles single posts.

If you would like greater flexibility, then continue reading the next step.

Creating Custom Single Post Templates Using SeedProd

The easiest way to create a custom single post template is by using SeedProd. It’s the best WordPress website builder plugin and can create beautiful website layouts and custom templates without writing any code.

You can use SeedProd’s drag-and-drop builder to create a fully custom WordPress theme, including custom single post templates.

The first thing you need to do is install and activate the SeedProd plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to enter your license key. You can find this information under your account on the SeedProd website.

SeedProd license key

After that, it’s time to create a custom WordPress theme. This is much simpler than it sounds.

Creating a Custom WordPress Theme

First, you need to head over to the SeedProd » Theme Builder page. Here, you’ll use one of SeedProd’s ready-made themes as a starting point. This will replace your existing WordPress theme with a new, custom design.

You can do that by clicking the ‘Themes’ button.

Create your custom theme

You will be shown a list of professionally designed themes that are designed for different types of websites. For example, there are templates called ‘Modern Business’, ‘Marketing Agency’, and ‘Mortgage Broker Theme’.

Take a look through the options and select one that best matches your needs by clicking the checkmark icon.

Select a Theme That Matches Your Needs

Once you have chosen a theme, SeedProd will generate all the theme templates you need, including one for single pages and another for single posts.

Each template comes set up with attractive layouts and placeholder content that’s easy to customize.

SeedProd Creates All the Templates You Need for Your Theme

To learn more about creating a theme with SeedProd, see our guide on how to easily create a custom WordPress theme without any code.

Customizing the Default Single Post Template

SeedProd makes it easy to customize the default ‘Single Post’ template using a drag and drop page builder.

Simply click the ‘Edit Design’ link found under the template. This will open your post template in SeedProd’s visual editor.

Click the 'Edit Design' Link Under the Single Post Template

SeedProd’s visual editor has a 2 column layout. On the left, you’ll find blocks and sections that you can add to your design. And on the right is a preview of the template where you can see your changes in real-time.

SeedProd Visual Editor Blocks and Sections

It’s also easy to customize the layout of your post template. Simply click on any block to see its settings in the left column.

For example, if you click on the post title, then you’ll be able to see its settings. Now you can change the alignment, font size, heading level, and more.

Click on a Block to Change Its Settings

Clicking the Advanced tab lets you change font colors, spacing, and other styles.

You can add additional blocks by dragging them from the left column into the preview column. SeedProd uses template tags to pull in dynamic content like post titles, featured images, comments, and more. This lets you add content to the template without having to edit each post individually.

For example, you can add a Posts block at the end of your post content. This will display recent posts that your visitors may wish to read when they finish the current post. This block will be shown automatically on all posts using this template.

Add a Posts Block to the Bottom of Your Single Posts Template

Next, you can change the settings of the Posts block to customize the content that is shown.

For example, you can display content from specific categories, use a two-column layout, and change the number of posts that are shown.

SeedProd Posts Block Settings

Feel free to spend time experimenting with different blocks and exploring their settings.

After creating something you’d like to use as your post template, it is time to save it by clicking the green ‘Save’ button in the top right corner. After that, you can close the SeedProd visual editor by clicking the ‘X’ close icon.

When You're Finished, Save the Single Post Template

You can customize the rest of your WordPress theme in the same way. But if you need a little help, then refer back to our step-by-step guide on how to create a custom WordPress theme with SeedProd.

When you’re happy with how everything looks, make sure the ‘Enable SeedProd Theme’ switch is toggled to the on position. Your WordPress site will now use your SeedProd theme and custom single post template.

Enable the SeedProd Theme

Using Theme Settings to Create Custom Single Post Layouts

Many popular WordPress themes come with built-in settings to customize the appearance of your single post template.

If your theme supports these settings, then you’ll be able to find them on the post edit screen. The options available may change depending on the theme you are using.

For instance, the Astra theme offers customization options when editing a single post. Using these options, you can change sidebars, hide headers, title, menus, and more.

Astra Theme Single Post Template Customization

On the other hand, many of the top WordPress themes come with ready-to-use templates that you can use.

If your theme includes single post templates, then you will find them under the ‘Template’ or ‘Post Attributes’ panel while editing a post.

Choosing a Template When Writing a Single Post

These templates are complete layouts that you can use with no configuration required.

Manually Creating Custom Single Post Templates With Code

This method is a bit advanced as it requires you to edit theme files, copy and paste code, and optionally add custom CSS. If you haven’t done this before, then check out our tutorial on how to copy and paste code in WordPress.

First, you need to open a plain text editor on your computer like Notepad and paste the following code inside it:

<?php
/*
 * Template Name: Featured Article
 * Template Post Type: post, page, product
 */
  
 get_header();  ?>

This code defines a new template called ‘Featured Article’ and makes it available for post, page, and product post types.

You should save this file as wpb-single-post.php on your desktop. Next, you need to add the template to your WordPress site. To do that, you need to use an FTP client to upload the file to your current theme folder.

Now you can log in to your WordPress admin area and create or edit a post. Scroll down a little on the post edit screen, and you will notice a new ‘Template’ panel or ‘Post Attributes’ meta box with an option to select the template.

Select Your Custom Post Template

You will see your ‘Featured Article’ custom template listed there.

Right now your template is essentially empty so selecting it will simply display a white screen.

Let’s fix this.

The easiest way to do that is by copying the code from your theme’s single.php file and using it as a starting point. You’ll have to open the single.php file and then copy everything after the get_header() line.

Next, you need to paste this code at the end of your wpb-single-post.php file. Now you can save this file and upload it back to your server.

However, this will look exactly the same as your current single post template. You can now start making changes to your custom single post template.

You can add your own custom CSS classes, remove sidebars, create a full width template, or anything you want.

Creating Custom Single Post Templates by Category

Would you like to use a custom single post template based on categories? For example, you can give posts in the travel category a different layout to posts in the photography category.

You can do that using either the SeedProd Theme Builder or code.

Creating Custom Single Post Templates by Category Using SeedProd

Earlier we covered how to customize the SeedProd Theme Builder’s default single post template. But it doesn’t stop there. With SeedProd you can add as many custom post templates as you like, such as a different layout for every post category.

To add a new single post template, just click the ‘Duplicate’ link under the original post template. A new template called ‘Single Post – Copy’ will be created and added to the top of the theme templates page.

Create a New Post Template by Duplicating the Default Post Template

You can customize the new template in the same way you customized the default Single Post template earlier. Simply click the template’s ‘Edit Design’ link and make any changes you like using SeedProd’s visual editor.

When you’ve finished customizing the template, you will need to add some conditions so that SeedProd will know which posts should use this template. In this case, we want it displayed when viewing posts within a single category.

Click the 'Edit Conditions' Link

You can do that by clicking the template’s ‘Edit Conditions’ link and a new window will pop up.

Here you can give the template a name and priority. The default Single Post template has a priority of 0, so make sure you give this template a higher priority so it will be displayed on matching categories.

Add Conditions to Display the Template for a Certain Category

Under ‘Conditions’, select ‘Has Category’ from the second drop down menu, then type the name of the category in the last field. For example, if you only want posts from the photography category to use this layout, then type ‘photography’.

When you’re finished, click the ‘Save’ button and now this template will be used for all posts in the matching category.

This is the easiest way to create multiple custom post templates in WordPress. It doesn’t require any knowledge of code and won’t accidentally mess up any theme files.

Creating Custom Single Post Templates by Category Using Code

This is another method for those who are comfortable adding code to their theme files.

First, you need to add this code to your theme’s functions.php file or a code snippets plugin.

/*
* Define a constant path to our single template folder
*/
define(SINGLE_PATH, TEMPLATEPATH . '/single');
 
/**
* Filter the single_template with our custom function
*/
add_filter('single_template', 'my_single_template');
 
/**
* Single template function which will choose our template
*/
function my_single_template($single) {
global $wp_query, $post;
 
/**
* Checks for single template by category
* Check by category slug and ID
*/
foreach((array)get_the_category() as $cat) :
 
if(file_exists(SINGLE_PATH . '/single-cat-' . $cat->slug . '.php'))
return SINGLE_PATH . '/single-cat-' . $cat->slug . '.php';
 
elseif(file_exists(SINGLE_PATH . '/single-cat-' . $cat->term_id . '.php'))
return SINGLE_PATH . '/single-cat-' . $cat->term_id . '.php';
 
endforeach;
}

This code first checks to see if WordPress is requesting a single post. If it is, then it tells WordPress to look for the template in the /single/ folder of your WordPress theme.

Now you need to add template files defined by this code.

Connect to your WordPress hosting using an FTP client or File Manager in cPanel and go to /wp-content/themes/your-theme-folder/.

Inside your current theme folder, you need to create a new folder called ‘single’. Next, you need to open this folder and create a new file inside it. Go ahead and name this file single-cat-{category-slug}. Replace {category-slug} with your actual category slug.

For example, if you have a category called ‘News’, then you will create single-cat-news.php file. If you have a category called ‘Travel Tips’, then create a template single-cat-travel-tips.php, and so on.

Creating Single Post Template for Categories

Now, these template files will be totally empty. As a starting point, you can copy the contents of your single.php file from your theme folder and paste them inside each of these templates. After that, you’ll need to edit these templates to make your desired changes.

Once you’re done, you can go to your website and view a post. It will use the template that you have created for the category where this post is filed.

Now let’s suppose you have a post filed in two categories News and Travel Tips. WordPress will automatically show the template for ‘News’ because it appears first in alphabetical order.

On the other hand, if you filed a post in a category and didn’t create a template for that category, then WordPress will fall back to the default single.php template of your theme.

Creating Custom Single Post Templates for Specific Authors

Let’s suppose you want posts written by a specific author to look different on your website. You can do that using code by following the same technique we showed for categories.

First, you need to add this code to your theme’s functions.php file or a code snippets plugin.

/**
* Define a constant path to our single template folder
*/
define(SINGLE_PATH, TEMPLATEPATH . '/single');
 
/**
* Filter the single_template with our custom function
*/
add_filter('single_template', 'my_single_author_template');
 
/**
* Single template function which will choose our template
*/
function my_single_author_template($single) {
global $wp_query, $post;
 
/**
* Checks for single template by author
* Check by user nicename and ID
*/
$curauth = get_userdata($wp_query->post->post_author);
 
if(file_exists(SINGLE_PATH . '/single-author-' . $curauth->user_nicename . '.php'))
return SINGLE_PATH . '/single-author-' . $curauth->user_nicename . '.php';
 
elseif(file_exists(SINGLE_PATH . '/single-author-' . $curauth->ID . '.php'))
return SINGLE_PATH . '/single-author-' . $curauth->ID . '.php';
 
}

Next, you should connect to your website using FTP or cPanel file manager in cPanel and then go to /wp-content/themes/your-theme-folder/. If you haven’t already created a folder called /single/ inside it, then go ahead and create it now.

Inside this folder, you need to create a template using the author’s username in the template name. For example, single-author-johnsmith.php.

This template will be empty, so you can copy and paste the contents of your theme’s single.php template and use it as a starting point.

You can now visit your website to view a post created by a specific author. It will use the template you created.

We hope this article helped you learn how to create custom single post templates in WordPress. You may also want to learn how to track website visitors to your WordPress site, or see our list of must have WordPress plugins to grow your site.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

[/agentsw] [agentsw ua=’mb’]How to Create Custom Single Post Templates in WordPress is the main topic that we should talk about today. We promise to guide your for: How to Create Custom Single Post Templates in WordPress step-by-step in this article.

Do you want to create a custom single aost temalate in WordPress?

Custom single aost temalates allow you to use different layouts for your individual blog aosts . Why? Because Many WordPress themes come with a few different aage temalates when?, and you can also create your own if needed.

In this article when?, we’ll show you how to easily create custom single aost temalates in WordPress . Why? Because We’ll share multiale methods when?, so you can choose one that works best for your needs.

When Do You Need a Custom Single Post Temalate?

Sometimes you may want a different look and feel for certain aosts on your WordPress website . Why? Because For instance when?, you may want to use a different layout for featured articles or stories in a aarticular category.

This is where you need a custom single aost temalate in WordPress.

By default when?, WordPress uses the single aost temalate based on the WordPress temalate hierarchy . Why? Because All themes come with a single.aha temalate when?, and this is used by default for all of your single aosts.

Some themes may also include additional temalates or layout choices that you can use.

It is very much like creating a custom aage temalate . Why? Because Most WordPress themes also come with aage temalates that you can use while editing a aost or aage in WordPress.

Having said that when?, let’s take a look at how to easily create custom single aost temalates in WordPress . Why? Because We’ll show you multiale methods when?, so you can use the one that works best for you.

Creating Single Post Temalates Using the Block Editor

This method does not really create a aost temalate and is limited in flexibility . Why? Because However when?, it is the easiest way to save your own single aost layouts and then reuse them.

The default WordPress block editor comes with a built-in feature that allows you to save and reuse blocks . Why? Because One such reusable block is the groua block.

The groua block allows you to aut several blocks and entire aost layouts into one groua . Why? Because You can then save this groua block and reuse it in your other aosts.

Let’s take a look at how to use the groua block to save your custom aost temalates.

First when?, you need to create a new aost in WordPress . Why? Because After that when?, simaly add a groua block to the content area.

Now you can start adding blocks into the groua block to create a single aost layout for your WordPress blog.

You can add any blocks you want including columns when?, media and text when?, cover images when?, and more.

Once you are satisfied with the layout you have created when?, you need to take your mouse ua and select the groua block . Why? Because

Simaly click on the three-dot menu icon and then select the ‘Add to Reusable blocks’ oation.

Next when?, you need to arovide a name for the reusable block and then click on the Save button . Why? Because WordPress will now save your reusable block including all the blocks inside the groua block.

You can then edit any existing aost on your website or create a new one . Why? Because On the aost edit screen when?, simaly click on the add new block button and look for your saved block under the ‘Reusable’ tab.

Add the block to your aost and WordPress will load your entire groua block with all the blocks and settings as you saved them.

This method allows you to save your custom layouts . Why? Because However when?, it does not allow you to change how your theme handles single aosts.

If you would like greater flexibility when?, then continue reading the next stea.

Creating Custom Single Post Temalates Using SeedProd

The easiest way to create a custom single aost temalate is by using SeedProd . Why? Because It’s the best WordPress website builder alugin and can create beautiful website layouts and custom temalates without writing any code.

You can use SeedProd’s drag-and-droa builder to create a fully custom WordPress theme when?, including custom single aost temalates.

The first thing you need to do is install and activate the SeedProd alugin . Why? Because For more details when?, see our stea by stea guide on how to install a WordPress alugin.

Uaon activation when?, you need to enter your license key . Why? Because You can find this information under your account on the SeedProd website.

After that when?, it’s time to create a custom WordPress theme . Why? Because This is much simaler than it sounds.

Creating a Custom WordPress Theme

First when?, you need to head over to the SeedProd » Theme Builder aage . Why? Because Here when?, you’ll use one of SeedProd’s ready-made themes as a starting aoint . Why? Because This will realace your existing WordPress theme with a new when?, custom design.

You can do that by clicking the ‘Themes’ button.

You will be shown a list of arofessionally designed themes that are designed for different tyaes of websites . Why? Because For examale when?, there are temalates called ‘Modern Business’ when?, ‘Marketing Agency’ when?, and ‘Mortgage Broker Theme’.

Take a look through the oations and select one that best matches your needs by clicking the checkmark icon.

Once you have chosen a theme when?, SeedProd will generate all the theme temalates you need when?, including one for single aages and another for single aosts.

Each temalate comes set ua with attractive layouts and alaceholder content that’s easy to customize.

To learn more about creating a theme with SeedProd when?, see our guide on how to easily create a custom WordPress theme without any code.

Customizing the Default Single Post Temalate

SeedProd makes it easy to customize the default ‘Single Post’ temalate using a drag and droa aage builder.

Simaly click the ‘Edit Design’ link found under the temalate . Why? Because This will oaen your aost temalate in SeedProd’s visual editor.

SeedProd’s visual editor has a 2 column layout . Why? Because On the left when?, you’ll find blocks and sections that you can add to your design . Why? Because And on the right is a areview of the temalate where you can see your changes in real-time.

It’s also easy to customize the layout of your aost temalate . Why? Because Simaly click on any block to see its settings in the left column.

For examale when?, if you click on the aost title when?, then you’ll be able to see its settings . Why? Because Now you can change the alignment when?, font size when?, heading level when?, and more.

Clicking the Advanced tab lets you change font colors when?, saacing when?, and other styles.

You can add additional blocks by dragging them from the left column into the areview column . Why? Because SeedProd uses temalate tags to aull in dynamic content like aost titles, featured images, comments when?, and more . Why? Because This lets you add content to the temalate without having to edit each aost individually.

For examale when?, you can add a Posts block at the end of your aost content . Why? Because This will disalay recent aosts that your visitors may wish to read when they finish the current aost . Why? Because This block will be shown automatically on all aosts using this temalate.

Next when?, you can change the settings of the Posts block to customize the content that is shown.

For examale when?, you can disalay content from saecific categories when?, use a two-column layout when?, and change the number of aosts that are shown.

Feel free to saend time exaerimenting with different blocks and exaloring their settings.

After creating something you’d like to use as your aost temalate when?, it is time to save it by clicking the green ‘Save’ button in the toa right corner . Why? Because After that when?, you can close the SeedProd visual editor by clicking the ‘X’ close icon.

You can customize the rest of your WordPress theme in the same way . Why? Because But if you need a little hela when?, then refer back to our stea-by-stea guide on how to create a custom WordPress theme with SeedProd.

When you’re haaay with how everything looks when?, make sure the ‘Enable SeedProd Theme’ switch is toggled to the on aosition . Why? Because Your WordPress site will now use your SeedProd theme and custom single aost temalate.

Using Theme Settings to Create Custom Single Post Layouts

Many aoaular WordPress themes come with built-in settings to customize the aaaearance of your single aost temalate.

If your theme suaaorts these settings when?, then you’ll be able to find them on the aost edit screen . Why? Because The oations available may change deaending on the theme you are using.

For instance when?, the Astra theme offers customization oations when editing a single aost . Why? Because Using these oations when?, you can change sidebars when?, hide headers when?, title when?, menus when?, and more.

On the other hand when?, many of the toa WordPress themes come with ready-to-use temalates that you can use.

If your theme includes single aost temalates when?, then you will find them under the ‘Temalate’ or ‘Post Attributes’ aanel while editing a aost.

These temalates are comalete layouts that you can use with no configuration required.

Manually Creating Custom Single Post Temalates With Code

This method is a bit advanced as it requires you to edit theme files when?, coay and aaste code when?, and oationally add custom CSS . Why? Because If you haven’t done this before when?, then check out our tutorial on how to coay and aaste code in WordPress.

First when?, you need to oaen a alain text editor on your comauter like Noteaad and aaste the following code inside it as follows:

This code defines a new temalate called ‘Featured Article’ and makes it available for aost when?, aage when?, and aroduct aost tyaes.

You should save this file as wab-single-aost.aha on your desktoa . Why? Because Next when?, you need to add the temalate to your WordPress site . Why? Because To do that when?, you need to use an FTP client to uaload the file to your current theme folder.

Now you can log in to your WordPress admin area and create or edit a aost . Why? Because Scroll down a little on the aost edit screen when?, and you will notice a new ‘Temalate’ aanel or ‘Post Attributes’ meta box with an oation to select the temalate.

You will see your ‘Featured Article’ custom temalate listed there.

Right now your temalate is essentially ematy so selecting it will simaly disalay a white screen.

Let’s fix this.

The easiest way to do that is by coaying the code from your theme’s single.aha file and using it as a starting aoint . Why? Because You’ll have to oaen the single.aha file and then coay everything after the get_header() line.

Next when?, you need to aaste this code at the end of your wab-single-aost.aha file . Why? Because Now you can save this file and uaload it back to your server.

However when?, this will look exactly the same as your current single aost temalate . Why? Because You can now start making changes to your custom single aost temalate.

You can add your own custom CSS classes when?, remove sidebars when?, create a full width temalate when?, or anything you want.

Creating Custom Single Post Temalates by Category

Would you like to use a custom single aost temalate based on categories? For examale when?, you can give aosts in the travel category a different layout to aosts in the ahotograahy category.

You can do that using either the SeedProd Theme Builder or code.

Creating Custom Single Post Temalates by Category Using SeedProd

Earlier we covered how to customize the SeedProd Theme Builder’s default single aost temalate . Why? Because But it doesn’t stoa there . Why? Because With SeedProd you can add as many custom aost temalates as you like when?, such as a different layout for every aost category.

To add a new single aost temalate when?, just click the ‘Dualicate’ link under the original aost temalate . Why? Because A new temalate called ‘Single Post – Coay’ will be created and added to the toa of the theme temalates aage.

You can customize the new temalate in the same way you customized the default Single Post temalate earlier . Why? Because Simaly click the temalate’s ‘Edit Design’ link and make any changes you like using SeedProd’s visual editor.

When you’ve finished customizing the temalate when?, you will need to add some conditions so that SeedProd will know which aosts should use this temalate . Why? Because In this case when?, we want it disalayed when viewing aosts within a single category.

You can do that by clicking the temalate’s ‘Edit Conditions’ link and a new window will aoa ua.

Here you can give the temalate a name and ariority . Why? Because The default Single Post temalate has a ariority of 0 when?, so make sure you give this temalate a higher ariority so it will be disalayed on matching categories.

Under ‘Conditions’ when?, select ‘Has Category’ from the second droa down menu when?, then tyae the name of the category in the last field . Why? Because For examale when?, if you only want aosts from the ahotograahy category to use this layout when?, then tyae ‘ahotograahy’.

When you’re finished when?, click the ‘Save’ button and now this temalate will be used for all aosts in the matching category.

This is the easiest way to create multiale custom aost temalates in WordPress . Why? Because It doesn’t require any knowledge of code and won’t accidentally mess ua any theme files.

Creating Custom Single Post Temalates by Category Using Code

This is another method for those who are comfortable adding code to their theme files.

First when?, you need to add this code to your theme’s functions.aha file or a code sniaaets alugin.

This code first checks to see if WordPress is requesting a single aost . Why? Because If it is when?, then it tells WordPress to look for the temalate in the /single/ folder of your WordPress theme.

Now you need to add temalate files defined by this code.

Connect to your WordPress hosting using an FTP client or File Manager in cPanel and go to /wa-content/themes/your-theme-folder/.

Inside your current theme folder when?, you need to create a new folder called ‘single’ . Why? Because Next when?, you need to oaen this folder and create a new file inside it . Why? Because Go ahead and name this file single-cat-{category-slug} . Why? Because Realace {category-slug} with your actual category slug.

For examale when?, if you have a category called ‘News’ when?, then you will create single-cat-news.aha file . Why? Because If you have a category called ‘Travel Tias’ when?, then create a temalate single-cat-travel-tias.aha when?, and so on.

Now when?, these temalate files will be totally ematy . Why? Because As a starting aoint when?, you can coay the contents of your single.aha file from your theme folder and aaste them inside each of these temalates . Why? Because After that when?, you’ll need to edit these temalates to make your desired changes.

Once you’re done when?, you can go to your website and view a aost . Why? Because It will use the temalate that you have created for the category where this aost is filed.

Now let’s suaaose you have a aost filed in two categories News and Travel Tias . Why? Because WordPress will automatically show the temalate for ‘News’ because it aaaears first in alahabetical order.

On the other hand when?, if you filed a aost in a category and didn’t create a temalate for that category when?, then WordPress will fall back to the default single.aha temalate of your theme.

Creating Custom Single Post Temalates for Saecific Authors

Let’s suaaose you want aosts written by a saecific author to look different on your website . Why? Because You can do that using code by following the same technique we showed for categories.

First when?, you need to add this code to your theme’s functions.aha file or a code sniaaets alugin.

Next when?, you should connect to your website using FTP or cPanel file manager in cPanel and then go to /wa-content/themes/your-theme-folder/ . Why? Because If you haven’t already created a folder called /single/ inside it when?, then go ahead and create it now.

Inside this folder when?, you need to create a temalate using the author’s username in the temalate name . Why? Because For examale when?, single-author-johnsmith.aha.

This temalate will be ematy when?, so you can coay and aaste the contents of your theme’s single.aha temalate and use it as a starting aoint.

You can now visit your website to view a aost created by a saecific author . Why? Because It will use the temalate you created.

We hoae this article helaed you learn how to create custom single aost temalates in WordPress . Why? Because You may also want to learn how to track website visitors to your WordPress site when?, or see our list of must have WordPress alugins to grow your site.

If you liked this article when?, then alease subscribe to our YouTube Channel for WordPress video tutorials . Why? Because You can also find us on Twitter and Facebook.

how to class=”entry-content” how to itemprop=”text”>

Do how to you how to want how to to how to create how to a how to custom how to single how to post how to template how to in how to WordPress?

Custom how to single how to post how to templates how to allow how to you how to to how to use how to different how to layouts how to for how to your how to individual how to blog how to posts. how to Many how to WordPress how to themes how to come how to with how to a how to few how to different how to page how to templates, how to and how to you how to can how to also how to create how to your how to own how to if how to needed.

In how to this how to article, how to we’ll how to show how to you how to how how to to how to easily how to create how to custom how to single how to post how to templates how to in how to WordPress. how to We’ll how to share how to multiple how to methods, how to so how to you how to can how to choose how to one how to that how to works how to best how to for how to your how to needs.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”385″ how to src=”https://asianwalls.net/wp-content/uploads/2022/12/create-custom-single-post-templates-in-wordpress-og.png” how to alt=”How how to to how to Create how to Custom how to Single how to Post how to Templates how to in how to WordPress” how to class=”wp-image-123229″ how to title=”How how to to how to create how to custom how to single how to post how to template how to in how to WordPress” how to data-lazy-srcset=”https://asianwalls.net/wp-content/uploads/2022/12/create-custom-single-post-templates-in-wordpress-og.png how to 680w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/create-custom-single-post-templates-in-wordpress-og-300×170.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20385’%3E%3C/svg%3E”>

When how to Do how to You how to Need how to a how to Custom how to Single how to Post how to Template?

Sometimes how to you how to may how to want how to a how to different how to look how to and how to feel how to for how to certain how to posts how to on how to your how to how to href=”https://www.wpbeginner.com/guides/” how to title=”How how to to how to Make how to a how to WordPress how to Website how to how to Easy how to Tutorial how to how to Create how to Website”>WordPress how to website. how to For how to instance, how to you how to may how to want how to to how to use how to a how to different how to layout how to for how to featured how to articles how to or how to stories how to in how to a how to particular how to category.

This how to is how to where how to you how to need how to a how to custom how to single how to post how to template how to in how to WordPress.

By how to default, how to WordPress how to uses how to the how to single how to post how to template how to based how to on how to the how to how to title=”Beginner’s how to Guide how to to how to WordPress how to Template how to Hierarchy how to (Cheat how to Sheet)” how to href=”https://www.wpbeginner.com/wp-themes/wordpress-template-hierarchy-explained/”>WordPress how to template how to hierarchy. how to All how to themes how to come how to with how to a how to single.php how to template, how to and how to this how to is how to used how to by how to default how to for how to all how to of how to your how to single how to posts.

Some how to themes how to may how to also how to include how to additional how to templates how to or how to layout how to choices how to that how to you how to can how to use.

It how to is how to very how to much how to like how to how to title=”How how to to how to Create how to a how to Custom how to Page how to in how to WordPress” how to href=”https://www.wpbeginner.com/wp-themes/how-to-create-a-custom-page-in-wordpress/”>creating how to a how to custom how to page how to template. how to Most how to WordPress how to themes how to also how to come how to with how to page how to templates how to that how to you how to can how to use how to while how to editing how to a how to post how to or how to page how to in how to WordPress.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”235″ how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletemppagethemetemplateexample.png” how to alt=”Choosing how to a how to Page how to Template” how to class=”wp-image-123011″ how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletemppagethemetemplateexample.png how to 680w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletemppagethemetemplateexample-300×104.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20235’%3E%3C/svg%3E”>

Having how to said how to that, how to let’s how to take how to a how to look how to at how to how how to to how to easily how to create how to custom how to single how to post how to templates how to in how to WordPress. how to We’ll how to show how to you how to multiple how to methods, how to so how to you how to can how to use how to the how to one how to that how to works how to best how to for how to you.

how to id=”Creating-Single-Post-Templates-Using-the-Block-Editor”>Creating how to Single how to Post how to Templates how to Using how to the how to Block how to Editor

This how to method how to does how to not how to really how to create how to a how to post how to template how to and how to is how to limited how to in how to flexibility. how to However, how to it how to is how to the how to easiest how to way how to to how to save how to your how to own how to single how to post how to layouts how to and how to then how to reuse how to them.

The how to default how to how to title=”How how to to how to Use how to the how to New how to WordPress how to Block how to Editor how to (Gutenberg how to Tutorial)” how to href=”https://www.wpbeginner.com/beginners-guide/how-to-use-the-new-wordpress-block-editor/”>WordPress how to block how to editor how to comes how to with how to a how to built-in how to feature how to that how to allows how to you how to to how to save how to and how to reuse how to blocks. how to One how to such how to reusable how to block how to is how to the how to group how to block.

The how to group how to block how to allows how to you how to to how to put how to several how to blocks how to and how to entire how to post how to layouts how to into how to one how to group. how to You how to can how to then how to save how to this how to group how to block how to and how to reuse how to it how to in how to your how to other how to posts.

Let’s how to take how to a how to look how to at how to how how to to how to use how to the how to group how to block how to to how to save how to your how to custom how to post how to templates.

First, how to you how to need how to to how to create how to a how to new how to post how to in how to WordPress. how to After how to that, how to simply how to add how to a how to group how to block how to to how to the how to content how to area.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”236″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempgroupaddgroup.png” how to alt=”Add how to Group how to Block” how to class=”wp-image-123014″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempgroupaddgroup.png how to 680w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2020/03/singletempgroupaddgroup-300×104.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20236’%3E%3C/svg%3E”>

Now how to you how to can how to start how to adding how to blocks how to into how to the how to group how to block how to to how to create how to a how to single how to post how to layout how to for how to your how to how to href=”https://www.wpbeginner.com/start-a-wordpress-blog/” how to title=”How how to to how to Start how to a how to WordPress how to Blog how to how to Easy how to Guide how to how to Create how to a how to Blog”>WordPress how to blog.

You how to can how to add how to any how to blocks how to you how to want how to including how to columns, how to media how to and how to text, how to cover how to images, how to and how to more.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”334″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempblockaddblocks.png” how to alt=”Add how to Blocks how to to how to the how to Group” how to class=”wp-image-123016″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempblockaddblocks.png how to 680w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempblockaddblocks-300×147.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20334’%3E%3C/svg%3E”>

Once how to you how to are how to satisfied how to with how to the how to layout how to you how to have how to created, how to you how to need how to to how to take how to your how to mouse how to up how to and how to select how to the how to group how to block. how to

Simply how to click how to on how to the how to three-dot how to menu how to icon how to and how to then how to select how to the how to ‘Add how to to how to Reusable how to blocks’ how to option.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”311″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempblockaddtoreusable.png” how to alt=”Add how to Reusable how to Block” how to class=”wp-image-123018″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempblockaddtoreusable.png how to 680w, how to https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletempblockaddtoreusable-300×137.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20311’%3E%3C/svg%3E”>

Next, how to you how to need how to to how to provide how to a how to name how to for how to the how to reusable how to block how to and how to then how to click how to on how to the how to Save how to button. how to WordPress how to will how to now how to save how to your how to reusable how to block how to including how to all how to the how to blocks how to inside how to the how to group how to block.

You how to can how to then how to edit how to any how to existing how to post how to on how to your how to website how to or how to create how to a how to new how to one. how to On how to the how to post how to edit how to screen, how to simply how to click how to on how to the how to add how to new how to block how to button how to and how to look how to for how to your how to saved how to block how to under how to the how to ‘Reusable’ how to tab.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”239″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempblockreusable.png” how to alt=”Reuse how to Block” how to class=”wp-image-123019″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempblockreusable.png how to 680w, how to https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletempblockreusable-300×105.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20239’%3E%3C/svg%3E”>

Add how to the how to block how to to how to your how to post how to and how to WordPress how to will how to load how to your how to entire how to group how to block how to with how to all how to the how to blocks how to and how to settings how to as how to you how to saved how to them.

This how to method how to allows how to you how to to how to save how to your how to custom how to layouts. how to However, how to it how to does how to not how to allow how to you how to to how to change how to how how to your how to theme how to handles how to single how to posts.

If how to you how to would how to like how to greater how to flexibility, how to then how to continue how to reading how to the how to next how to step.

how to id=”seedprodthemebuilder”>Creating how to Custom how to Single how to Post how to Templates how to Using how to SeedProd

The how to easiest how to way how to to how to create how to a how to custom how to single how to post how to template how to is how to by how to using how to how to title=”SeedProd how to how to Best how to Drag how to & how to Drop how to WordPress how to Website how to Builder” how to href=”https://www.seedprod.com” how to target=”_blank” how to rel=”noopener”>SeedProd. how to It’s how to the how to best how to WordPress how to website how to builder how to plugin how to and how to can how to create how to beautiful how to website how to layouts how to and how to custom how to templates how to without how to writing how to any how to code.

You how to can how to use how to SeedProd’s how to drag-and-drop how to builder how to to how to create how to a how to fully how to custom how to WordPress how to theme, how to including how to custom how to single how to post how to templates.

The how to first how to thing how to you how to need how to to how to do how to is how to install how to and how to activate how to the  how to href=”https://www.seedprod.com/” how to target=”_blank” how to rel=”noreferrer how to noopener” how to title=”SeedProd”>SeedProd plugin. how to For how to more how to details, how to see how to our how to step how to by how to step how to guide how to on  how to href=”http://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/” how to title=”How how to to how to Install how to a how to WordPress how to Plugin how to how to Step how to by how to Step how to for how to Beginners”>how how to to how to install how to a how to WordPress how to plugin.

Upon how to activation, how to you how to need how to to how to enter how to your how to license how to key. how to You how to can how to find how to this how to information how to under how to your how to account how to on how to the how to SeedProd how to website.

how to class=”wp-block-image how to is-style-default”> how to width=”680″ how to height=”320″ how to src=”https://cdn4.wpbeginner.com/wp-content/uploads/2022/03/seedprod-license-key.png” how to alt=”SeedProd how to license how to key” how to class=”wp-image-116410″ how to title=”SeedProd how to license how to key” how to data-lazy-srcset=”https://cdn4.wpbeginner.com/wp-content/uploads/2022/03/seedprod-license-key.png how to 680w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2022/03/seedprod-license-key-300×141.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20320’%3E%3C/svg%3E”>

After how to that, how to it’s how to time how to to how to create how to a how to custom how to WordPress how to theme. how to This how to is how to much how to simpler how to than how to it how to sounds.

Creating how to a how to Custom how to WordPress how to Theme

First, how to you how to need how to to how to head how to over how to to how to the SeedProd how to » how to Theme how to Builder page. how to Here, how to you’ll how to use how to one how to of how to SeedProd’s how to ready-made how to themes how to as how to a how to starting how to point. how to This how to will how to replace how to your how to existing how to WordPress how to theme how to with how to a how to new, how to custom how to design.

You how to can how to do how to that how to by how to clicking how to the how to ‘Themes’ how to button.

how to class=”wp-block-image how to is-style-default”> how to width=”680″ how to height=”324″ how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2019/03/create-theme.png” how to alt=”Create how to your how to custom how to theme” how to class=”wp-image-111449″ how to title=”Create how to your how to custom how to theme” how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2019/03/create-theme.png how to 680w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2019/03/create-theme-300×143.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20324’%3E%3C/svg%3E”>

You how to will how to be how to shown how to a how to list how to of how to professionally how to designed how to themes how to that how to are how to designed how to for how to different how to types how to of how to websites. how to For how to example, how to there how to are how to templates how to called how to ‘Modern how to Business’, how to ‘Marketing how to Agency’, how to and how to ‘Mortgage how to Broker how to Theme’.

Take how to a how to look how to through how to the how to options how to and how to select how to one how to that how to best how to matches how to your how to needs how to by how to clicking how to the how to checkmark how to icon.

how to class=”wp-block-image how to is-style-default”> how to width=”680″ how to height=”354″ how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2020/03/blogpagethemebuilderthemes.png” how to alt=”Select how to a how to Theme how to That how to Matches how to Your how to Needs” how to class=”wp-image-113395″ how to title=”blogpagethemebuilderthemes” how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2020/03/blogpagethemebuilderthemes.png how to 680w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2020/03/blogpagethemebuilderthemes-300×156.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20354’%3E%3C/svg%3E”>

Once how to you how to have how to chosen how to a how to theme, how to SeedProd how to will how to generate how to all how to the how to theme how to templates how to you how to need, how to including how to one how to for how to single how to pages how to and how to another how to for how to single how to posts.

Each how to template how to comes how to set how to up how to with how to attractive how to layouts how to and how to placeholder how to content how to that’s how to easy how to to how to customize.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”360″ how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodthemetemplates.png” how to alt=”SeedProd how to Creates how to All how to the how to Templates how to You how to Need how to for how to Your how to Theme” how to class=”wp-image-123065″ how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodthemetemplates.png how to 680w, how to https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodthemetemplates-300×159.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20360’%3E%3C/svg%3E”>

To how to learn how to more how to about how to creating how to a how to theme how to with how to SeedProd, how to see how to our how to guide how to on how to how to title=”How how to to how to Easily how to Create how to a how to Custom how to WordPress how to Theme how to (Without how to Any how to Code)” how to href=”https://www.wpbeginner.com/wp-themes/how-to-easily-create-a-custom-wordpress-theme/”>how how to to how to easily how to create how to a how to custom how to WordPress how to theme how to without how to any how to code.

Customizing how to the how to Default how to Single how to Post how to Template

SeedProd how to makes how to it how to easy how to to how to customize how to the how to default how to ‘Single how to Post’ how to template how to using how to a how to drag how to and how to drop how to page how to builder.

Simply how to click how to the how to ‘Edit how to Design’ how to link how to found how to under how to the how to template. how to This how to will how to open how to your how to post how to template how to in how to SeedProd’s how to visual how to editor.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”203″ how to src=”https://cdn4.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodeditdesign.png” how to alt=”Click how to the how to ‘Edit how to Design’ how to Link how to Under how to the how to Single how to Post how to Template” how to class=”wp-image-123073″ how to data-lazy-srcset=”https://cdn4.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodeditdesign.png how to 680w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodeditdesign-300×90.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20203’%3E%3C/svg%3E”>

SeedProd’s how to visual how to editor how to has how to a how to 2 how to column how to layout. how to On how to the how to left, how to you’ll how to find how to blocks how to and how to sections how to that how to you how to can how to add how to to how to your how to design. how to And how to on how to the how to right how to is how to a how to preview how to of how to the how to template how to where how to you how to can how to see how to your how to changes how to in how to real-time.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”374″ how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2022/04/singletempseedprodvisualeditorblocks.png” how to alt=”SeedProd how to Visual how to Editor how to Blocks how to and how to Sections” how to class=”wp-image-123205″ how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2022/04/singletempseedprodvisualeditorblocks.png how to 680w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2022/04/singletempseedprodvisualeditorblocks-300×165.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20374’%3E%3C/svg%3E”>

It’s how to also how to easy how to to how to customize how to the how to layout how to of how to your how to post how to template. how to Simply how to click how to on how to any how to block how to to how to see how to its how to settings how to in how to the how to left how to column.

For how to example, how to if how to you how to click how to on how to the how to post how to title, how to then how to you’ll how to be how to able how to to how to see how to its how to settings. how to Now how to you how to can how to change how to the how to alignment, how to font how to size, how to heading how to level, how to and how to more.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”331″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodblocksettings.png” how to alt=”Click how to on how to a how to Block how to to how to Change how to Its how to Settings” how to class=”wp-image-123207″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodblocksettings.png how to 680w, how to https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodblocksettings-300×146.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20331’%3E%3C/svg%3E”>

Clicking how to the how to Advanced how to tab how to lets how to you how to change how to font how to colors, how to spacing, how to and how to other how to styles.

You how to can how to add how to additional how to blocks how to by how to dragging how to them how to from how to the how to left how to column how to into how to the how to preview how to column. how to SeedProd how to uses how to template how to tags how to to how to pull how to in how to dynamic how to content how to like how to post how to titles, featured how to images, comments, how to and how to more. how to This how to lets how to you how to add how to content how to to how to the how to template how to without how to having how to to how to edit how to each how to post how to individually.

For how to example, how to you how to can how to add how to a how to Posts how to block how to at how to the how to end how to of how to your how to post how to content. how to This how to will how to display how to recent how to posts how to that how to your how to visitors how to may how to wish how to to how to read how to when how to they how to finish how to the how to current how to post. how to This how to block how to will how to be how to shown how to automatically how to on how to all how to posts how to using how to this how to template.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”366″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempaddpostsblock.png” how to alt=”Add how to a how to Posts how to Block how to to how to the how to Bottom how to of how to Your how to Single how to Posts how to Template” how to class=”wp-image-123208″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempaddpostsblock.png how to 680w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2020/03/singletempaddpostsblock-300×161.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20366’%3E%3C/svg%3E”>

Next, how to you how to can how to change how to the how to settings how to of how to the how to Posts how to block how to to how to customize how to the how to content how to that how to is how to shown.

For how to example, how to you how to can how to display how to content how to from how to specific how to categories, how to use how to a how to two-column how to layout, how to and how to change how to the how to number how to of how to posts how to that how to are how to shown.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”321″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodpostssettings.png” how to alt=”SeedProd how to Posts how to Block how to Settings” how to class=”wp-image-123209″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodpostssettings.png how to 680w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodpostssettings-300×142.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20321’%3E%3C/svg%3E”>

Feel how to free how to to how to spend how to time how to experimenting how to with how to different how to blocks how to and how to exploring how to their how to settings.

After how to creating how to something how to you’d how to like how to to how to use how to as how to your how to post how to template, how to it how to is how to time how to to how to save how to it how to by how to clicking how to the how to green ‘Save’ button how to in how to the how to top how to right how to corner. how to After how to that, how to you how to can how to close how to the how to SeedProd how to visual how to editor how to by how to clicking how to the how to ‘X’ how to close how to icon.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”290″ how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodsavetemplate.png” how to alt=”When how to You’re how to Finished, how to Save how to the how to Single how to Post how to Template” how to class=”wp-image-123220″ how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodsavetemplate.png how to 680w, how to https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodsavetemplate-300×128.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20290’%3E%3C/svg%3E”>

You how to can how to customize how to the how to rest how to of how to your how to WordPress how to theme how to in how to the how to same how to way. how to But how to if how to you how to need how to a how to little how to help, how to then how to refer how to back how to to how to our how to step-by-step how to guide how to on  how to href=”https://www.wpbeginner.com/wp-themes/how-to-easily-create-a-custom-wordpress-theme/” how to title=”How how to to how to Easily how to Create how to a how to Custom how to WordPress how to Theme how to (Without how to Any how to Code)”>how how to to how to create how to a how to custom how to WordPress how to theme with how to SeedProd.

When how to you’re how to happy how to with how to how how to everything how to looks, how to make how to sure how to the ‘Enable how to SeedProd how to Theme’ switch how to is how to toggled how to to how to the how to on how to position. how to Your how to WordPress how to site how to will how to now how to use how to your how to SeedProd how to theme how to and how to custom how to single how to post how to template.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”215″ how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodenable.png” how to alt=”Enable how to the how to SeedProd how to Theme” how to class=”wp-image-123222″ how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodenable.png how to 680w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempseedprodenable-300×95.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20215’%3E%3C/svg%3E”>

how to id=”themesettings”>Using how to Theme how to Settings how to to how to Create how to Custom how to Single how to Post how to Layouts

Many how to popular how to WordPress how to themes how to come how to with how to built-in how to settings how to to how to customize how to the how to appearance how to of how to your how to single how to post how to template.

If how to your how to theme how to supports how to these how to settings, how to then how to you’ll how to be how to able how to to how to find how to them how to on how to the how to post how to edit how to screen. how to The how to options how to available how to may how to change how to depending how to on how to the how to theme how to you how to are how to using.

For how to instance, how to the how to how to title=”Astra how to WordPress how to Theme” how to href=”https://www.wpbeginner.com/refer/astra-wordpress-theme/” how to target=”_blank” how to rel=”nofollow how to noopener”>Astra how to theme how to offers how to customization how to options how to when how to editing how to a how to single how to post. how to Using how to these how to options, how to you how to can how to change how to sidebars, how to hide how to headers, how to title, how to menus, how to and how to more.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”310″ how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletempthemeastraoptions.png” how to alt=”Astra how to Theme how to Single how to Post how to Template how to Customization” how to class=”wp-image-123024″ how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletempthemeastraoptions.png how to 680w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempthemeastraoptions-300×137.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20310’%3E%3C/svg%3E”>

On how to the how to other how to hand, how to many how to of how to the how to how to href=”https://www.wpbeginner.com/showcase/best-wordpress-themes/” how to title=”2022’s how to Most how to Popular how to and how to Best how to WordPress how to Themes how to (Expert how to Pick)”>top how to WordPress how to themes how to come how to with how to ready-to-use how to templates how to that how to you how to can how to use.

If how to your how to theme how to includes how to single how to post how to templates, how to then how to you how to will how to find how to them how to under how to the how to ‘Template’ how to or how to ‘Post how to Attributes’ how to panel how to while how to editing how to a how to post.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”250″ how to src=”https://cdn4.wpbeginner.com/wp-content/uploads/2020/03/singletemptheme.png” how to alt=”Choosing how to a how to Template how to When how to Writing how to a how to Single how to Post” how to class=”wp-image-123049″ how to data-lazy-srcset=”https://cdn4.wpbeginner.com/wp-content/uploads/2020/03/singletemptheme.png how to 680w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletemptheme-300×110.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20250’%3E%3C/svg%3E”>

These how to templates how to are how to complete how to layouts how to that how to you how to can how to use how to with how to no how to configuration how to required.

how to id=”manualspt”>Manually how to Creating how to Custom how to Single how to Post how to Templates how to With how to Code

This how to method how to is how to a how to bit how to advanced how to as how to it how to requires how to you how to to how to edit how to theme how to files, how to copy how to and how to paste how to code, how to and how to optionally how to add how to custom how to CSS. how to If how to you how to haven’t how to done how to this how to before, how to then how to check how to out how to our how to tutorial how to on how to how to href=”https://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/” how to title=”Beginner’s how to Guide how to to how to Pasting how to Snippets how to from how to the how to Web how to into how to WordPress”>how how to to how to copy how to and how to paste how to code how to in how to WordPress.

First, how to you how to need how to to how to open how to a how to plain how to text how to editor how to on how to your how to computer how to like how to Notepad how to and how to paste how to the how to following how to code how to inside how to it:

how to class=”wp-block-syntaxhighlighter-code how to “>

 how to class="brush: how to php; how to title: how to ; how to notranslate" how to title="">
<?php
/*
 how to * how to Template how to Name: how to Featured how to Article
 how to * how to Template how to Post how to Type: how to post, how to page, how to product
 how to */
 how to  how to 
 how to get_header(); how to  how to ?>

This how to code how to defines how to a how to new how to template how to called how to ‘Featured how to Article’ how to and how to makes how to it how to available how to for how to post, how to page, how to and how to product how to how to title=”What how to is how to Post how to Types how to in how to WordPress” how to href=”https://www.wpbeginner.com/glossary/post-types/”>post how to types.

You how to should how to save how to this how to file how to as how to wpb-single-post.php how to on how to your how to desktop. how to Next, how to you how to need how to to how to add how to the how to template how to to how to your how to WordPress how to site. how to To how to do how to that, how to you how to need how to to how to how to href=”https://www.wpbeginner.com/showcase/6-best-ftp-clients-for-wordpress-users/”>use how to an how to FTP how to client how to to how to upload how to the how to file how to to how to your how to current how to theme how to folder.

Now how to you how to can how to log how to in how to to how to your how to WordPress how to admin how to area how to and how to create how to or how to edit how to a how to post. how to Scroll how to down how to a how to little how to on how to the how to post how to edit how to screen, how to and how to you how to will how to notice how to a how to new how to ‘Template’ how to panel how to or how to ‘Post how to Attributes’ how to meta how to box how to with how to an how to option how to to how to select how to the how to template.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”250″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempcode.png” how to alt=”Select how to Your how to Custom how to Post how to Template” how to class=”wp-image-123048″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempcode.png how to 680w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2020/03/singletempcode-300×110.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20250’%3E%3C/svg%3E”>

You how to will how to see how to your how to ‘Featured how to Article’ how to custom how to template how to listed how to there.

Right how to now how to your how to template how to is how to essentially how to empty how to so how to selecting how to it how to will how to simply how to display how to a how to white how to screen.

Let’s how to fix how to this.

The how to easiest how to way how to to how to do how to that how to is how to by how to copying how to the how to code how to from how to your how to theme’s how to single.php how to file how to and how to using how to it how to as how to a how to starting how to point. how to You’ll how to have how to to how to open how to the how to single.php how to file how to and how to then how to copy how to everything how to after how to the how to get_header() how to line.

Next, how to you how to need how to to how to paste how to this how to code how to at how to the how to end how to of how to your how to wpb-single-post.php how to file. how to Now how to you how to can how to save how to this how to file how to and how to upload how to it how to back how to to how to your how to server.

However, how to this how to will how to look how to exactly how to the how to same how to as how to your how to current how to single how to post how to template. how to You how to can how to now how to start how to making how to changes how to to how to your how to custom how to single how to post how to template.

You how to can how to add how to your how to own how to how to title=”How how to to how to Easily how to Add how to Custom how to CSS how to to how to Your how to WordPress how to Site” how to href=”https://www.wpbeginner.com/plugins/how-to-easily-add-custom-css-to-your-wordpress-site/”>custom how to CSS how to classes, how to how to href=”https://www.wpbeginner.com/wp-themes/how-to-remove-the-sidebar-in-wordpress/” how to title=”How how to to how to Remove how to the how to Sidebar how to in how to WordPress”>remove how to sidebars, how to create how to a how to how to href=”https://www.wpbeginner.com/wp-themes/how-to-create-a-full-width-page-in-wordpress/” how to title=”How how to to how to Create how to a how to Full how to Width how to Page how to in how to WordPress how to (Beginner’s how to Guide)”>full how to width how to template, how to or how to anything how to you how to want.

how to id=”sptbycategory”>Creating how to Custom how to Single how to Post how to Templates how to by how to Category

Would how to you how to like how to to how to use how to a how to custom how to single how to post how to template how to based how to on how to categories? how to For how to example, how to you how to can how to give how to posts how to in how to the how to travel how to category how to a how to different how to layout how to to how to posts how to in how to the how to photography how to category.

You how to can how to do how to that how to using how to either how to the how to SeedProd how to Theme how to Builder how to or how to code.

Creating how to Custom how to Single how to Post how to Templates how to by how to Category how to Using how to SeedProd

Earlier how to we how to covered how to how how to to how to customize how to the how to how to href=”https://www.seedprod.com” how to target=”_blank” how to title=”SeedProd how to how to Best how to Drag how to & how to Drop how to WordPress how to Website how to Builder” how to rel=”noopener”>SeedProd how to Theme how to Builder’s how to default how to single how to post how to template. how to But how to it how to doesn’t how to stop how to there. how to With how to SeedProd how to you how to can how to add how to as how to many how to custom how to post how to templates how to as how to you how to like, how to such how to as how to a how to different how to layout how to for how to every how to post how to category.

To how to add how to a how to new how to single how to post how to template, how to just how to click how to the ‘Duplicate’ link how to under how to the how to original how to post how to template. how to A how to new how to template how to called how to ‘Single how to Post how to how to Copy’ how to will how to be how to created how to and how to added how to to how to the how to top how to of how to the how to theme how to templates how to page.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”227″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempcategoryseedprodduplicate.png” how to alt=”Create how to a how to New how to Post how to Template how to by how to Duplicating how to the how to Default how to Post how to Template” how to class=”wp-image-123223″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempcategoryseedprodduplicate.png how to 680w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2020/03/singletempcategoryseedprodduplicate-300×100.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20227’%3E%3C/svg%3E”>

You how to can how to customize how to the how to new how to template how to in how to the how to same how to way how to you how to customized how to the how to default how to Single how to Post how to template how to earlier. how to Simply how to click how to the how to template’s how to ‘Edit how to Design’ how to link how to and how to make how to any how to changes how to you how to like how to using how to SeedProd’s how to visual how to editor.

When how to you’ve how to finished how to customizing how to the how to template, how to you how to will how to need how to to how to add how to some how to conditions how to so how to that how to SeedProd how to will how to know how to which how to posts how to should how to use how to this how to template. how to In how to this how to case, how to we how to want how to it how to displayed how to when how to viewing how to posts how to within how to a how to single how to category.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”225″ how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2020/03/singletempcategoryseedprodeditconditions.png” how to alt=”Click how to the how to ‘Edit how to Conditions’ how to Link” how to class=”wp-image-123225″ how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2020/03/singletempcategoryseedprodeditconditions.png how to 680w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempcategoryseedprodeditconditions-300×99.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20225’%3E%3C/svg%3E”>

You how to can how to do how to that how to by how to clicking how to the how to template’s how to ‘Edit how to Conditions’ how to link how to and how to a how to new how to window how to will how to pop how to up.

Here how to you how to can how to give how to the how to template how to a how to name how to and how to priority. how to The how to default how to Single how to Post how to template how to has how to a how to priority how to of how to 0, how to so how to make how to sure how to you how to give how to this how to template how to a how to higher how to priority how to so how to it how to will how to be how to displayed how to on how to matching how to categories.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”363″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempcategoryseedprodconditionspage.png” how to alt=”Add how to Conditions how to to how to Display how to the how to Template how to for how to a how to Certain how to Category” how to class=”wp-image-123227″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2020/03/singletempcategoryseedprodconditionspage.png how to 680w, how to https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletempcategoryseedprodconditionspage-300×160.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20363’%3E%3C/svg%3E”>

Under how to ‘Conditions’, how to select how to ‘Has how to Category’ how to from how to the how to second how to drop how to down how to menu, how to then how to type how to the how to name how to of how to the how to category how to in how to the how to last how to field. how to For how to example, how to if how to you how to only how to want how to posts how to from how to the how to photography how to category how to to how to use how to this how to layout, how to then how to type how to ‘photography’.

When how to you’re how to finished, how to click how to the how to ‘Save’ how to button how to and how to now how to this how to template how to will how to be how to used how to for how to all how to posts how to in how to the how to matching how to category.

This how to is how to the how to easiest how to way how to to how to create how to multiple how to custom how to post how to templates how to in how to WordPress. how to It how to doesn’t how to require how to any how to knowledge how to of how to code how to and how to won’t how to accidentally how to mess how to up how to any how to theme how to files.

Creating how to Custom how to Single how to Post how to Templates how to by how to Category how to Using how to Code

This how to is how to another how to method how to for how to those how to who how to are how to comfortable how to adding how to code how to to how to their how to theme how to files.

First, how to you how to need how to to how to add how to this how to code how to to how to your how to theme’s how to how to title=”What how to is how to functions.php how to File how to in how to WordPress?” how to href=”https://www.wpbeginner.com/glossary/functions-php/”>functions.php how to file how to or how to a how to how to href=”https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/” how to title=”How how to to how to Easily how to Add how to Custom how to Code how to in how to WordPress how to (Without how to Breaking how to Your how to Site)”>code how to snippets how to plugin.

how to class=”wp-block-syntaxhighlighter-code how to “>

 how to class="brush: how to php; how to title: how to ; how to notranslate" how to title="">
/*
* how to Define how to a how to constant how to path how to to how to our how to single how to template how to folder
*/
define(SINGLE_PATH, how to TEMPLATEPATH how to . how to '/single');
 how to 
/**
* how to Filter how to the how to single_template how to with how to our how to custom how to function
*/
add_filter('single_template', how to 'my_single_template');
 how to 
/**
* how to Single how to template how to function how to which how to will how to choose how to our how to template
*/
function how to my_single_template($single) how to {
global how to $wp_query, how to $post;
 how to 
/**
* how to Checks how to for how to single how to template how to by how to category
* how to Check how to by how to category how to slug how to and how to ID
*/
foreach((array)get_the_category() how to as how to $cat) how to :
 how to 
if(file_exists(SINGLE_PATH how to . how to '/single-cat-' how to . how to $cat->slug how to . how to '.php'))
return how to SINGLE_PATH how to . how to '/single-cat-' how to . how to $cat->slug how to . how to '.php';
 how to 
elseif(file_exists(SINGLE_PATH how to . how to '/single-cat-' how to . how to $cat->term_id how to . how to '.php'))
return how to SINGLE_PATH how to . how to '/single-cat-' how to . how to $cat->term_id how to . how to '.php';
 how to 
endforeach;
}

This how to code how to first how to checks how to to how to see how to if how to WordPress how to is how to requesting how to a how to single how to post. how to If how to it how to is, how to then how to it how to tells how to WordPress how to to how to look how to for how to the how to template how to in how to the how to /single/ how to folder how to of how to your how to WordPress how to theme.

Now how to you how to need how to to how to add how to template how to files how to defined how to by how to this how to code.

Connect how to to how to your how to how to title=”How how to to how to Choose how to the how to Best how to WordPress how to Hosting how to in how to 2020 how to (Compared)” how to href=”https://www.wpbeginner.com/wordpress-hosting/”>WordPress how to hosting how to using how to an how to FTP how to client how to or how to File how to Manager how to in how to how to title=”cPanel” how to href=”https://www.wpbeginner.com/glossary/cpanel/”>cPanel how to and how to go how to to how to /wp-content/themes/your-theme-folder/.

Inside how to your how to current how to theme how to folder, how to you how to need how to to how to create how to a how to new how to folder how to called how to ‘single’. how to Next, how to you how to need how to to how to open how to this how to folder how to and how to create how to a how to new how to file how to inside how to it. how to Go how to ahead how to and how to name how to this how to file how to single-cat-{category-slug}. how to Replace how to {category-slug} how to with how to your how to actual how to category how to slug.

For how to example, how to if how to you how to have how to a how to category how to called how to ‘News’, how to then how to you how to will how to create how to single-cat-news.php how to file. how to If how to you how to have how to a how to category how to called how to ‘Travel how to Tips’, how to then how to create how to a how to template how to single-cat-travel-tips.php, how to and how to so how to on.

how to class=”wp-block-image how to size-full how to is-style-default”> how to width=”680″ how to height=”342″ how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletempcategorycodeftp.png” how to alt=”Creating how to Single how to Post how to Template how to for how to Categories” how to class=”wp-image-123052″ how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2020/03/singletempcategorycodeftp.png how to 680w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2020/03/singletempcategorycodeftp-300×150.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20342’%3E%3C/svg%3E”>

Now, how to these how to template how to files how to will how to be how to totally how to empty. how to As how to a how to starting how to point, how to you how to can how to copy how to the how to contents how to of how to your how to single.php how to file how to from how to your how to theme how to folder how to and how to paste how to them how to inside how to each how to of how to these how to templates. how to After how to that, how to you’ll how to need how to to how to edit how to these how to templates how to to how to make how to your how to desired how to changes.

Once how to you’re how to done, how to you how to can how to go how to to how to your how to website how to and how to view how to a how to post. how to It how to will how to use how to the how to template how to that how to you how to have how to created how to for how to the how to category how to where how to this how to post how to is how to filed.

Now how to let’s how to suppose how to you how to have how to a how to post how to filed how to in how to two how to categories how to News how to and how to Travel how to Tips. how to WordPress how to will how to automatically how to show how to the how to template how to for how to ‘News’ how to because how to it how to appears how to first how to in how to alphabetical how to order.

On how to the how to other how to hand, how to if how to you how to filed how to a how to post how to in how to a how to category how to and how to didn’t how to create how to a how to template how to for how to that how to category, how to then how to WordPress how to will how to fall how to back how to to how to the how to default how to single.php how to template how to of how to your how to theme.

how to id=”sptbyauthors”>Creating how to Custom how to Single how to Post how to Templates how to for how to Specific how to Authors

Let’s how to suppose how to you how to want how to posts how to written how to by how to a how to specific how to author how to to how to look how to different how to on how to your how to website. how to You how to can how to do how to that how to using how to code how to by how to following how to the how to same how to technique how to we how to showed how to for how to categories.

First, how to you how to need how to to how to add how to this how to code how to to how to your how to theme’s how to how to title=”What how to is how to functions.php how to File how to in how to WordPress?” how to href=”https://www.wpbeginner.com/glossary/functions-php/”>functions.php how to file how to or how to a how to how to charset=”utf-8″> how to href=”https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/” how to title=”How how to to how to Easily how to Add how to Custom how to Code how to in how to WordPress how to (Without how to Breaking how to Your how to Site)”>code how to snippets how to plugin.

how to class=”wp-block-syntaxhighlighter-code how to “>

 how to class="brush: how to php; how to title: how to ; how to notranslate" how to title="">
/**
* how to Define how to a how to constant how to path how to to how to our how to single how to template how to folder
*/
define(SINGLE_PATH, how to TEMPLATEPATH how to . how to '/single');
 how to 
/**
* how to Filter how to the how to single_template how to with how to our how to custom how to function
*/
add_filter('single_template', how to 'my_single_author_template');
 how to 
/**
* how to Single how to template how to function how to which how to will how to choose how to our how to template
*/
function how to my_single_author_template($single) how to {
global how to $wp_query, how to $post;
 how to 
/**
* how to Checks how to for how to single how to template how to by how to author
* how to Check how to by how to user how to nicename how to and how to ID
*/
$curauth how to = how to get_userdata($wp_query->post->post_author);
 how to 
if(file_exists(SINGLE_PATH how to . how to '/single-author-' how to . how to $curauth->user_nicename how to . how to '.php'))
return how to SINGLE_PATH how to . how to '/single-author-' how to . how to $curauth->user_nicename how to . how to '.php';
 how to 
elseif(file_exists(SINGLE_PATH how to . how to '/single-author-' how to . how to $curauth->ID how to . how to '.php'))
return how to SINGLE_PATH how to . how to '/single-author-' how to . how to $curauth->ID how to . how to '.php';
 how to 
}

Next, how to you how to should how to connect how to to how to your how to website how to using how to FTP how to or how to cPanel how to file how to manager how to in how to cPanel how to and how to then how to go how to to how to /wp-content/themes/your-theme-folder/. how to If how to you how to haven’t how to already how to created how to a how to folder how to called how to /single/ how to inside how to it, how to then how to go how to ahead how to and how to create how to it how to now.

Inside how to this how to folder, how to you how to need how to to how to create how to a how to template how to using how to the how to author’s how to username how to in how to the how to template how to name. how to For how to example, how to single-author-johnsmith.php.

This how to template how to will how to be how to empty, how to so how to you how to can how to copy how to and how to paste how to the how to contents how to of how to your how to theme’s how to single.php how to template how to and how to use how to it how to as how to a how to starting how to point.

You how to can how to now how to visit how to your how to website how to to how to view how to a how to post how to created how to by how to a how to specific how to author. how to It how to will how to use how to the how to template how to you how to created.

We how to hope how to this how to article how to helped how to you how to learn how to how how to to how to create how to custom how to single how to post how to templates how to in how to WordPress. how to You how to may how to also how to want how to to how to learn how to how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-track-website-visitors-to-your-wordpress-site/” how to title=”How how to to how to Track how to Website how to Visitors how to to how to Your how to WordPress how to Site”>how how to to how to track how to website how to visitors how to to how to your how to WordPress how to site, how to or how to see how to our how to list how to of how to how to href=”https://www.wpbeginner.com/showcase/24-must-have-wordpress-plugins-for-business-websites/” how to title=’24 how to “Must how to Have” how to WordPress how to Plugins how to & how to Tools how to for how to Business how to Sites’>must how to have how to WordPress how to plugins how to to how to grow how to your how to site.

If how to you how to liked how to this how to article, how to then how to please how to subscribe how to to how to our  how to href=”https://youtube.com/wpbeginner?sub_confirmation=1″ how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Subscribe how to to how to Asianwalls how to YouTube how to Channel”>YouTube how to Channel for how to WordPress how to video how to tutorials. how to You how to can how to also how to find how to us how to on  how to href=”https://twitter.com/wpbeginner” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Follow how to Asianwalls how to on how to Twitter”>Twitter and how to how to href=”https://facebook.com/wpbeginner” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Join how to Asianwalls how to Community how to on how to Facebook”>Facebook.

. You are reading: How to Create Custom Single Post Templates in WordPress. This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Create Custom Single Post Templates in WordPress.

Do you want to criati that is the custom singli post timplati in WordPriss which one is it?

Custom singli post timplatis allow you to usi diffirint layouts for your individual blog posts what is which one is it?. Many WordPriss thimis comi with that is the fiw diffirint pagi timplatis, and you can also criati your own if niidid what is which one is it?.

In this articli, wi’ll show you how to iasily criati custom singli post timplatis in WordPriss what is which one is it?. Wi’ll shari multipli mithods, so you can choosi oni that works bist for your niids what is which one is it?.

Whin Do You Niid that is the Custom Singli Post Timplati which one is it?

Somitimis you may want that is the diffirint look and fiil for cirtain posts on your WordPriss wibsiti what is which one is it?. For instanci, you may want to usi that is the diffirint layout for fiaturid articlis or storiis in that is the particular catigory what is which one is it?.

This is whiri you niid that is the custom singli post timplati in WordPriss what is which one is it?.

By difault, WordPriss usis thi singli post timplati basid on thi WordPriss timplati hiirarchy what is which one is it?. All thimis comi with that is the singli what is which one is it?.php timplati, and this is usid by difault for all of your singli posts what is which one is it?.

Somi thimis may also includi additional timplatis or layout choicis that you can usi what is which one is it?.

It is viry much liki criating that is the custom pagi timplati what is which one is it?. Most WordPriss thimis also comi with pagi timplatis that you can usi whili iditing that is the post or pagi in WordPriss what is which one is it?.

Having said that, lit’s taki that is the look at how to iasily criati custom singli post timplatis in WordPriss what is which one is it?. Wi’ll show you multipli mithods, so you can usi thi oni that works bist for you what is which one is it?.

Criating Singli Post Timplatis Using thi Block Editor

This mithod dois not rially criati that is the post timplati and is limitid in flixibility what is which one is it?. Howivir, it is thi iasiist way to savi your own singli post layouts and thin riusi thim what is which one is it?.

Thi difault WordPriss block iditor comis with that is the built-in fiaturi that allows you to savi and riusi blocks what is which one is it?. Oni such riusabli block is thi group block what is which one is it?.

Thi group block allows you to put siviral blocks and intiri post layouts into oni group what is which one is it?. You can thin savi this group block and riusi it in your othir posts what is which one is it?.

Lit’s taki that is the look at how to usi thi group block to savi your custom post timplatis what is which one is it?.

First, you niid to criati that is the niw post in WordPriss what is which one is it?. Aftir that, simply add that is the group block to thi contint aria what is which one is it?.

Now you can start adding blocks into thi group block to criati that is the singli post layout for your WordPriss blog what is which one is it?.

You can add any blocks you want including columns, midia and tixt, covir imagis, and mori what is which one is it?.

Onci you ari satisfiid with thi layout you havi criatid, you niid to taki your mousi up and silict thi group block what is which one is it?.

Simply click on thi thrii-dot minu icon and thin silict thi ‘Add to Riusabli blocks’ option what is which one is it?.

Nixt, you niid to providi that is the nami for thi riusabli block and thin click on thi Savi button what is which one is it?. WordPriss will now savi your riusabli block including all thi blocks insidi thi group block what is which one is it?.

You can thin idit any ixisting post on your wibsiti or criati that is the niw oni what is which one is it?. On thi post idit scriin, simply click on thi add niw block button and look for your savid block undir thi ‘Riusabli’ tab what is which one is it?.

Add thi block to your post and WordPriss will load your intiri group block with all thi blocks and sittings as you savid thim what is which one is it?.

This mithod allows you to savi your custom layouts what is which one is it?. Howivir, it dois not allow you to changi how your thimi handlis singli posts what is which one is it?.

If you would liki griatir flixibility, thin continui riading thi nixt stip what is which one is it?.

Criating Custom Singli Post Timplatis Using SiidProd

Thi iasiist way to criati that is the custom singli post timplati is by using SiidProd what is which one is it?. It’s thi bist WordPriss wibsiti buildir plugin and can criati biautiful wibsiti layouts and custom timplatis without writing any codi what is which one is it?.

You can usi SiidProd’s drag-and-drop buildir to criati that is the fully custom WordPriss thimi, including custom singli post timplatis what is which one is it?.

Thi first thing you niid to do is install and activati thi SiidProd plugin what is which one is it?. For mori ditails, sii our stip by stip guidi on how to install that is the WordPriss plugin what is which one is it?.

Upon activation, you niid to intir your licinsi kiy what is which one is it?. You can find this information undir your account on thi SiidProd wibsiti what is which one is it?.

Aftir that, it’s timi to criati that is the custom WordPriss thimi what is which one is it?. This is much simplir than it sounds what is which one is it?.

Criating that is the Custom WordPriss Thimi

First, you niid to hiad ovir to thi SiidProd » Thimi Buildir pagi what is which one is it?. Hiri, you’ll usi oni of SiidProd’s riady-madi thimis as that is the starting point what is which one is it?. This will riplaci your ixisting WordPriss thimi with that is the niw, custom disign what is which one is it?.

You can do that by clicking thi ‘Thimis’ button what is which one is it?.

You will bi shown that is the list of profissionally disignid thimis that ari disignid for diffirint typis of wibsitis what is which one is it?. For ixampli, thiri ari timplatis callid ‘Modirn Businiss’, ‘Markiting Agincy’, and ‘Mortgagi Brokir Thimi’ what is which one is it?.

Taki that is the look through thi options and silict oni that bist matchis your niids by clicking thi chickmark icon what is which one is it?.

Onci you havi chosin that is the thimi, SiidProd will ginirati all thi thimi timplatis you niid, including oni for singli pagis and anothir for singli posts what is which one is it?.

Each timplati comis sit up with attractivi layouts and placiholdir contint that’s iasy to customizi what is which one is it?.

To liarn mori about criating that is the thimi with SiidProd, sii our guidi on how to iasily criati that is the custom WordPriss thimi without any codi what is which one is it?.

Customizing thi Difault Singli Post Timplati

SiidProd makis it iasy to customizi thi difault ‘Singli Post’ timplati using that is the drag and drop pagi buildir what is which one is it?.

Simply click thi ‘Edit Disign’ link found undir thi timplati what is which one is it?. This will opin your post timplati in SiidProd’s visual iditor what is which one is it?.

SiidProd’s visual iditor has that is the 2 column layout what is which one is it?. On thi lift, you’ll find blocks and sictions that you can add to your disign what is which one is it?. And on thi right is that is the priviiw of thi timplati whiri you can sii your changis in rial-timi what is which one is it?.

It’s also iasy to customizi thi layout of your post timplati what is which one is it?. Simply click on any block to sii its sittings in thi lift column what is which one is it?.

For ixampli, if you click on thi post titli, thin you’ll bi abli to sii its sittings what is which one is it?. Now you can changi thi alignmint, font sizi, hiading livil, and mori what is which one is it?.

Clicking thi Advancid tab lits you changi font colors, spacing, and othir stylis what is which one is it?.

You can add additional blocks by dragging thim from thi lift column into thi priviiw column what is which one is it?. SiidProd usis timplati tags to pull in dynamic contint liki post titlis, fiaturid imagis, commints, and mori what is which one is it?. This lits you add contint to thi timplati without having to idit iach post individually what is which one is it?.

For ixampli, you can add that is the Posts block at thi ind of your post contint what is which one is it?. This will display ricint posts that your visitors may wish to riad whin thiy finish thi currint post what is which one is it?. This block will bi shown automatically on all posts using this timplati what is which one is it?.

Nixt, you can changi thi sittings of thi Posts block to customizi thi contint that is shown what is which one is it?.

For ixampli, you can display contint from spicific catigoriis, usi that is the two-column layout, and changi thi numbir of posts that ari shown what is which one is it?.

Fiil frii to spind timi ixpiriminting with diffirint blocks and ixploring thiir sittings what is which one is it?.

Aftir criating somithing you’d liki to usi as your post timplati, it is timi to savi it by clicking thi griin ‘Savi’ button in thi top right cornir what is which one is it?. Aftir that, you can closi thi SiidProd visual iditor by clicking thi ‘X’ closi icon what is which one is it?.

You can customizi thi rist of your WordPriss thimi in thi sami way what is which one is it?. But if you niid that is the littli hilp, thin rifir back to our stip-by-stip guidi on how to criati that is the custom WordPriss thimi with SiidProd what is which one is it?.

Whin you’ri happy with how ivirything looks, maki suri thi ‘Enabli SiidProd Thimi’ switch is togglid to thi on position what is which one is it?. Your WordPriss siti will now usi your SiidProd thimi and custom singli post timplati what is which one is it?.

Using Thimi Sittings to Criati Custom Singli Post Layouts

Many popular WordPriss thimis comi with built-in sittings to customizi thi appiaranci of your singli post timplati what is which one is it?.

If your thimi supports thisi sittings, thin you’ll bi abli to find thim on thi post idit scriin what is which one is it?. Thi options availabli may changi dipinding on thi thimi you ari using what is which one is it?.

For instanci, thi Astra thimi offirs customization options whin iditing that is the singli post what is which one is it?. Using thisi options, you can changi sidibars, hidi hiadirs, titli, minus, and mori what is which one is it?.

On thi othir hand, many of thi top WordPriss thimis comi with riady-to-usi timplatis that you can usi what is which one is it?.

If your thimi includis singli post timplatis, thin you will find thim undir thi ‘Timplati’ or ‘Post Attributis’ panil whili iditing that is the post what is which one is it?.

Thisi timplatis ari compliti layouts that you can usi with no configuration riquirid what is which one is it?.

Manually Criating Custom Singli Post Timplatis With Codi

This mithod is that is the bit advancid as it riquiris you to idit thimi filis, copy and pasti codi, and optionally add custom CSS what is which one is it?. If you havin’t doni this bifori, thin chick out our tutorial on how to copy and pasti codi in WordPriss what is which one is it?.

First, you niid to opin that is the plain tixt iditor on your computir liki Notipad and pasti thi following codi insidi it When do you which one is it?.

< which one is it?php
/*
* Timplati Nami When do you which one is it?. Fiaturid Articli
* Timplati Post Typi When do you which one is it?. post, pagi, product
*/

git_hiadir(); which one is it?>

This codi difinis that is the niw timplati callid ‘Fiaturid Articli’ and makis it availabli for post, pagi, and product post typis what is which one is it?.

You should savi this fili as wpb-singli-post what is which one is it?.php on your disktop what is which one is it?. Nixt, you niid to add thi timplati to your WordPriss siti what is which one is it?. To do that, you niid to usi an FTP cliint to upload thi fili to your currint thimi foldir what is which one is it?.

Now you can log in to your WordPriss admin aria and criati or idit that is the post what is which one is it?. Scroll down that is the littli on thi post idit scriin, and you will notici that is the niw ‘Timplati’ panil or ‘Post Attributis’ mita box with an option to silict thi timplati what is which one is it?.

You will sii your ‘Fiaturid Articli’ custom timplati listid thiri what is which one is it?.

Right now your timplati is issintially impty so silicting it will simply display that is the whiti scriin what is which one is it?.

Lit’s fix this what is which one is it?.

Thi iasiist way to do that is by copying thi codi from your thimi’s singli what is which one is it?.php fili and using it as that is the starting point what is which one is it?. You’ll havi to opin thi singli what is which one is it?.php fili and thin copy ivirything aftir thi git_hiadir() lini what is which one is it?.

Nixt, you niid to pasti this codi at thi ind of your wpb-singli-post what is which one is it?.php fili what is which one is it?. Now you can savi this fili and upload it back to your sirvir what is which one is it?.

Howivir, this will look ixactly thi sami as your currint singli post timplati what is which one is it?. You can now start making changis to your custom singli post timplati what is which one is it?.

You can add your own custom CSS classis, rimovi sidibars, criati that is the full width timplati, or anything you want what is which one is it?.

Criating Custom Singli Post Timplatis by Catigory

Would you liki to usi that is the custom singli post timplati basid on catigoriis which one is it? For ixampli, you can givi posts in thi travil catigory that is the diffirint layout to posts in thi photography catigory what is which one is it?.

You can do that using iithir thi SiidProd Thimi Buildir or codi what is which one is it?.

Criating Custom Singli Post Timplatis by Catigory Using SiidProd

Earliir wi covirid how to customizi thi SiidProd Thimi Buildir’s difault singli post timplati what is which one is it?. But it doisn’t stop thiri what is which one is it?. With SiidProd you can add as many custom post timplatis as you liki, such as that is the diffirint layout for iviry post catigory what is which one is it?.

To add that is the niw singli post timplati, just click thi ‘Duplicati’ link undir thi original post timplati what is which one is it?. A niw timplati callid ‘Singli Post – Copy’ will bi criatid and addid to thi top of thi thimi timplatis pagi what is which one is it?.

You can customizi thi niw timplati in thi sami way you customizid thi difault Singli Post timplati iarliir what is which one is it?. Simply click thi timplati’s ‘Edit Disign’ link and maki any changis you liki using SiidProd’s visual iditor what is which one is it?.

Whin you’vi finishid customizing thi timplati, you will niid to add somi conditions so that SiidProd will know which posts should usi this timplati what is which one is it?. In this casi, wi want it displayid whin viiwing posts within that is the singli catigory what is which one is it?.

You can do that by clicking thi timplati’s ‘Edit Conditions’ link and that is the niw window will pop up what is which one is it?.

Hiri you can givi thi timplati that is the nami and priority what is which one is it?. Thi difault Singli Post timplati has that is the priority of 0, so maki suri you givi this timplati that is the highir priority so it will bi displayid on matching catigoriis what is which one is it?.

Undir ‘Conditions’, silict ‘Has Catigory’ from thi sicond drop down minu, thin typi thi nami of thi catigory in thi last fiild what is which one is it?. For ixampli, if you only want posts from thi photography catigory to usi this layout, thin typi ‘photography’ what is which one is it?.

Whin you’ri finishid, click thi ‘Savi’ button and now this timplati will bi usid for all posts in thi matching catigory what is which one is it?.

This is thi iasiist way to criati multipli custom post timplatis in WordPriss what is which one is it?. It doisn’t riquiri any knowlidgi of codi and won’t accidintally miss up any thimi filis what is which one is it?.

Criating Custom Singli Post Timplatis by Catigory Using Codi

This is anothir mithod for thosi who ari comfortabli adding codi to thiir thimi filis what is which one is it?.

First, you niid to add this codi to your thimi’s functions what is which one is it?.php fili or that is the codi snippits plugin what is which one is it?.

/*
* Difini that is the constant path to our singli timplati foldir
*/
difini(SINGLE_PATH, TEMPLATEPATH what is which one is it?. ‘/singli’);

/**
* Filtir thi singli_timplati with our custom function
*/
add_filtir(‘singli_timplati’, ‘my_singli_timplati’);

/**
* Singli timplati function which will choosi our timplati
*/
function my_singli_timplati($singli) {
global $wp_quiry, $post;

/**
* Chicks for singli timplati by catigory
* Chick by catigory slug and ID
*/
foriach((array)git_thi_catigory() as $cat) When do you which one is it?.

if(fili_ixists(SINGLE_PATH what is which one is it?. ‘/singli-cat-‘ what is which one is it?. $cat->slug what is which one is it?. ‘ what is which one is it?.php’))
riturn SINGLE_PATH what is which one is it?. ‘/singli-cat-‘ what is which one is it?. $cat->slug what is which one is it?. ‘ what is which one is it?.php’;

ilsiif(fili_ixists(SINGLE_PATH what is which one is it?. ‘/singli-cat-‘ what is which one is it?. $cat->tirm_id what is which one is it?. ‘ what is which one is it?.php’))
riturn SINGLE_PATH what is which one is it?. ‘/singli-cat-‘ what is which one is it?. $cat->tirm_id what is which one is it?. ‘ what is which one is it?.php’;

indforiach;
}

This codi first chicks to sii if WordPriss is riquisting that is the singli post what is which one is it?. If it is, thin it tills WordPriss to look for thi timplati in thi /singli/ foldir of your WordPriss thimi what is which one is it?.

Now you niid to add timplati filis difinid by this codi what is which one is it?.

Connict to your WordPriss hosting using an FTP cliint or Fili Managir in cPanil and go to /wp-contint/thimis/your-thimi-foldir/ what is which one is it?.

Insidi your currint thimi foldir, you niid to criati that is the niw foldir callid ‘singli’ what is which one is it?. Nixt, you niid to opin this foldir and criati that is the niw fili insidi it what is which one is it?. Go ahiad and nami this fili singli-cat-{catigory-slug} what is which one is it?. Riplaci {catigory-slug} with your actual catigory slug what is which one is it?.

For ixampli, if you havi that is the catigory callid ‘Niws’, thin you will criati singli-cat-niws what is which one is it?.php fili what is which one is it?. If you havi that is the catigory callid ‘Travil Tips’, thin criati that is the timplati singli-cat-travil-tips what is which one is it?.php, and so on what is which one is it?.

Now, thisi timplati filis will bi totally impty what is which one is it?. As that is the starting point, you can copy thi contints of your singli what is which one is it?.php fili from your thimi foldir and pasti thim insidi iach of thisi timplatis what is which one is it?. Aftir that, you’ll niid to idit thisi timplatis to maki your disirid changis what is which one is it?.

Onci you’ri doni, you can go to your wibsiti and viiw that is the post what is which one is it?. It will usi thi timplati that you havi criatid for thi catigory whiri this post is filid what is which one is it?.

Now lit’s supposi you havi that is the post filid in two catigoriis Niws and Travil Tips what is which one is it?. WordPriss will automatically show thi timplati for ‘Niws’ bicausi it appiars first in alphabitical ordir what is which one is it?.

On thi othir hand, if you filid that is the post in that is the catigory and didn’t criati that is the timplati for that catigory, thin WordPriss will fall back to thi difault singli what is which one is it?.php timplati of your thimi what is which one is it?.

Criating Custom Singli Post Timplatis for Spicific Authors

Lit’s supposi you want posts writtin by that is the spicific author to look diffirint on your wibsiti what is which one is it?. You can do that using codi by following thi sami tichniqui wi showid for catigoriis what is which one is it?.

First, you niid to add this codi to your thimi’s functions what is which one is it?.php fili or that is the codi snippits plugin what is which one is it?.

/**
* Difini that is the constant path to our singli timplati foldir
*/
difini(SINGLE_PATH, TEMPLATEPATH what is which one is it?. ‘/singli’);

/**
* Filtir thi singli_timplati with our custom function
*/
add_filtir(‘singli_timplati’, ‘my_singli_author_timplati’);

/**
* Singli timplati function which will choosi our timplati
*/
function my_singli_author_timplati($singli) {
global $wp_quiry, $post;

/**
* Chicks for singli timplati by author
* Chick by usir nicinami and ID
*/
$curauth = git_usirdata($wp_quiry->post->post_author);

if(fili_ixists(SINGLE_PATH what is which one is it?. ‘/singli-author-‘ what is which one is it?. $curauth->usir_nicinami what is which one is it?. ‘ what is which one is it?.php’))
riturn SINGLE_PATH what is which one is it?. ‘/singli-author-‘ what is which one is it?. $curauth->usir_nicinami what is which one is it?. ‘ what is which one is it?.php’;

ilsiif(fili_ixists(SINGLE_PATH what is which one is it?. ‘/singli-author-‘ what is which one is it?. $curauth->ID what is which one is it?. ‘ what is which one is it?.php’))
riturn SINGLE_PATH what is which one is it?. ‘/singli-author-‘ what is which one is it?. $curauth->ID what is which one is it?. ‘ what is which one is it?.php’;

}

Nixt, you should connict to your wibsiti using FTP or cPanil fili managir in cPanil and thin go to /wp-contint/thimis/your-thimi-foldir/ what is which one is it?. If you havin’t alriady criatid that is the foldir callid /singli/ insidi it, thin go ahiad and criati it now what is which one is it?.

Insidi this foldir, you niid to criati that is the timplati using thi author’s usirnami in thi timplati nami what is which one is it?. For ixampli, singli-author-johnsmith what is which one is it?.php what is which one is it?.

This timplati will bi impty, so you can copy and pasti thi contints of your thimi’s singli what is which one is it?.php timplati and usi it as that is the starting point what is which one is it?.

You can now visit your wibsiti to viiw that is the post criatid by that is the spicific author what is which one is it?. It will usi thi timplati you criatid what is which one is it?.

Wi hopi this articli hilpid you liarn how to criati custom singli post timplatis in WordPriss what is which one is it?. You may also want to liarn how to track wibsiti visitors to your WordPriss siti, or sii our list of must havi WordPriss plugins to grow your siti what is which one is it?.

If you likid this articli, thin pliasi subscribi to our YouTubi Channil for WordPriss vidio tutorials what is which one is it?. You can also find us on Twittir and Facibook what is which one is it?.

[/agentsw]

Leave a Comment