How to update a child theme in the Installed Themes page?


#1

Hello guys!
Here’s the background for my question below:
1- I decided to create a child theme instead of using the theme itself, so that I won’t lose my modifications on the theme
2- In order to do that, I:
2.1- I created a new directory into /public_html/wp-content/themes/ called mainTheme-child, and inside this new directory:
2.2- I create a new file called style.css with the code below:
/*
Theme Name: Biznesspack Child
Theme URI: http://pioneerthemes.com/biznesspack/
Description: Biznesspack brings your site to easily custmoize the theme option. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content. Our default theme for 2017 works great in many languages, for any abilities, and on any device.
Author: Pioneerthemes
Author URI: http://www.pioneerthemes.com/
Template: Biznesspack
Version: 1.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, right-sidebar, flexible-header, custom-colors, custom-logo, editor-style, featured-images, footer-widgets, theme-options, threaded-comments, translation-ready, rtl-language-support
Text Domain: biznesspack
*/
2.3 - I created a new file functions.php. Here’s the code:

<?php function theme_enqueue_styles() { $parent_style = 'biznesspack'; wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); } add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); ?>

2.4- Finally, I copied the file screenshot.png from the main theme to the child theme directory

I did this using the local WP (installed on my machine) too, and the child theme is listed as a Installed Theme. Heres’s a screeshot:

My question is: why it doesn’t work using the WP/directory on the Webhost server? I mean, I did all the steps above on the server side, but I still cannot see the child theme on WP:
image

I appreciate if you have some hint why it doesn’t work/how I can fix it.

Thx


#2

Just use custom CSS in wordpress :slight_smile:


#3

Never mind guys!
I realized the version I informed in the style.css in the child directory was wrong, and I found out this error:


So I changed the version to the right one in the child (according to the parent), deleted the parent directory, and then I installed it again through the link above.

One last thing: the information in Template is case sensitive. So, it must inform the exactly name’s directory for the parent theme:
Template: biznesspack /* It was Biznesspack previously*/
Version: 1.5.1

Now I can see both themes:

I hope this post helps other fellows someday.