Home web designing wordpress Create Custom WordPress Category Page Template Without Plugin

Create Custom WordPress Category Page Template Without Plugin

0
SHARE

Bloggers loves custom WordPress template .Custom template helps to increase the session time and reduce bounce rate .As same Custom category page play a great role to boost the website/blog value and helps reader to provide more custom and relevant content .To create a custom wordpress category to options .One is create wordpress category using category plugin and the other is create it without plugin .Because many wordpress users avoid plugin usage for new functionality addition .In this article learn how to create wordpress category  without plugin . 

Steps to create custom category template

  • Create custom category .php file in theme folder .
  • Add php code in it .

Create New PHP File

In the article we will create a custom wordpress category template for  “computer” category  .To create it without plugin you have to create a specific file in theme folder with name “category-computer.php“. Two methods to do it .

  1. Create this file on local computer using text editor such as note pad and upload it to theme folder using ftp client such as filezilla .
  2. Or login to cpanel and create new file “category-computer.php” directly in theme folder .
READ ALSO : -  Solution- Onclick Function Not Working Wordpress Post

Exact location of the file is wp-content>themes>current-theme>category-computer.php . File name format must be “category + category name + .php ” .

That’s all the custom wordpress category template is created .But when you try to load computer category page in web browser , it displays blank .It is due to” category-computer.php” file is blank . So insert the minimum php code to run it .

Minimum Functions For New Created .PHP File

category-computer.php is displayed in Appearance >Editor . Click on editor to open it .Place the php code inside your custom category file .Minimum code to for this page as follows .

<?php get_header(); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?> 

This minimum code is required to run your custom file .You can use custom header and custom footer for wordpress custom template .Now go to your website and check the specific category page for which you create custom page .

Your custom category page is working but only header ,sidebar and footer is displayed . After that place any custom codes for your custom category page .

READ ALSO : -  HTML5 - DOCTYPE , Document Type Declaration Of Page

But all the upper three functions must required . All of your custom code place between anywhere in header and footer