I want to override a parent theme. I tried the codes below (and many others from parent-style
till panoramic-style
in functions.php
but no luck). After all the modifications I refresh the admin page and can't see the child theme. What do I do wrong?
Folder hierarchy:
Parent:
E:\xampp\htdocs\wordpress\wp-content\themes\panoramic
Child:
E:\xampp\htdocs\wordpress\wp-content\themes\panoramic\panoramic-child
In the child folder I created a style.css
and a functions.php
So let's see some codes:
panoramic-child/functions.php
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'panoramic', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'panoramic-child', get_stylesheet_uri());
}
?>
panoramic-child/styles.css
/*
* Theme Name: Panoramic child
* Theme URI: http://www.outtheboxthemes.com/themes/panoramic/
* Author: Out the Box
* Author URI: http://www.outtheboxthemes.com/
* Description: Panoramic is a well designed, fully responsive theme
* Version: 1.0.18
* License: GNU General Public License v2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: panoramic-child
* Template: panoramic
*/
.page-id-2 #secondary{
display:none;
}
styles.css
(the parent one's header comment section)
/*
* Theme Name: Panoramic
* Theme URI: http://www.outtheboxthemes.com/themes/panoramic/
* Author: Out the Box
* Author URI: http://www.outtheboxthemes.com/
* Description: Panoramic is a well designed, fully responsive theme with a homepage slider that's easy to customize and offers 5 star support. The subtle design features give it a premium feel and the wide range of flexible theme options help you create a variety of sites from a simple blog to a fully functional online eCommerce store. Used in conjunction with SiteOrigin's drag and drop Page Builder plugin, you can easily build beautiful page layouts with no coding knowledge to create any website from travel to business to food, decor, lifestyle, sport and more. Panoramic integrates seamlessly with the following popular free plugins: SiteOrigin's Page Builder, Contact Form 7 and WooCommerce.
* Version: 1.0.18
* License: GNU General Public License v2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: panoramic
* Template: panoramic
*/