Search code examples
wordpressbitnami

New Wordpress template not showing in wp-admin


I have been creating templates and these have been showing in the template drop down as they should in wp-admin. However, after update to wp version 5.5, when I create a template using the example code below, it does not show in the template list on the wp-admin

<?php
/* Template Name: Reflection */
?>

I am using a child theme and both child theme and parent theme have style.css and the correct theme version as they should. Just to add, this is a bitnami wordpress hosted with aws. Help will be much appreciated.

Here is the child style.css

  /*
   Theme Name: cbusiness-consult-lite-child
   Theme URI: mybase.com/wp-content/themes/cbusiness-consult-lite-child
   Description: My first child theme. Parent theme: cbusiness-consult-lite- child.
   Version: 0.4.
   Template: cbusiness-consult-lite
   Text Domain: cbusiness-consult-lite-child
   Tags: black, white, red, one-column, two-columns, right-sidebar, fluid- 
   layout, responsive-layout, photoblogging, left-sidebar, translation-ready, 
   custom-background, custom-colors, custom-menu, featured-images, full- 
   width-template, post-formats, theme-options, threaded-comments
  */
   @import url("../cbusiness-consult-lite/style.css");

and here are a few lines from the parent theme's style.css

  /*
 Theme Name: CBusiness Consult Lite
 Theme URI: https://www.themescave.com/themes/wordpress-theme-corporate-free- cbusiness-consult-lite/
 Author: Themescave
 Author URI: http://www.themescave.com/
 Description: CBusiness Consult Pro WordPress has used for most of all type 
 of business including Business consultant, news, portfolio, blogs, etc. Its 
 used for the multipurpose business like Marketing, Finance, Stock Market, IT 
 infrastructure, Consultant, Manufacture plant, Services, Retailer, 
 Wholesaler, Online business, Store, IT Firm, Cloth business, and many more 
 business. please check our demo http://themescave.com/demo/cbusiness- 
 consult-pro/. Documentation URL: 
 https://www.themescave.com/documentation/cbusiness-consult-pro/ & Pro theme 
 URL: https://www.themescave.com/themes/wordpress-theme-corporate-cbusiness- 
 consult-pro/  & Support Url: 
 https://www.themescave.com/forums/forum/cbusiness-consult-pro/;
 Version: 0.4
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: cbusiness-consult-lite
 Tags: custom-menu,one-column,right-sidebar,theme-options,threaded- 
 comments,translation-ready,blog,custom-background,custom-colors,custom- 
 header,featured-images,full-width-template,two- 
 columns,photography,portfolio,sticky-post

 CBusiness Consult Lite WordPress Theme, Copyright 2019 
 themescave(themescave.com)
CBusiness Consult Lite is distributed under the terms of the GNU GPL
*/
/*------------------------------------------------------------------

[Table of contents]

1. Main Tags
2. Accessibility

-------------------------------------------------------------------*/
/* Main Tags */
*{ margin:0; padding:0; outline:none;}
body{ margin:0; padding:0;line-height:20px; font-size:13px; color:#5c5c5c; 
font-family:'PT Sans', Helvetica, sans-serif;}
ol,ul{ margin:0; padding:0;}
ul li ul, ul li ul li ul, ol li ol, ol li ol li ol{ margin-left:10px;}
h1,h2,h3,h4,h5,h6{ color:#484f5e; font-family:'raleway', sans-serif; margin:0 
0 20px; padding:0; line-height:1.1; font-weight:400; }
h1{ font-size:32px;}
h2{ font-size:28px;}
h3{ font-size:23px;}
h4{ font-size:20px;}
h5{ font-size:18px;}
h6{ font-size:16px;}
img{ border:none; margin:0; padding:0; height:auto}
html,body {  font-size: 15px; }
p{ margin:0; padding:0;}
a{ text-decoration:none; color:#5c5c5c;}
a:hover{ color:#333;}

    

Solution

  • For those facing a similar problem, I eventually learned that when templates are created in the theme's root, then it works and the template is visible in the wp-admin. I am satisfied with this though, I believe there should be a better way of going around this.