Known good child themes do not work on my site?
-
Hi, I have tried, unsuccessfully to get a functional child theme made up. Right now I have a modified parent theme, but I would like to separate my changes into a child theme, however this does not seem to be possible.
I know it is supposed to work, however I have tested known good basic child theme examples for twenty fourteen, which produced the same results. One blank white screen with no HTML. It is not like a missing stylesheet, no PHP files are loading and no HTML is rendered at all. There is no html in the source.
Here is my child theme contents:
style.css
/* Theme Name: twentyfourteen Child Theme Theme URI: https://hyperlinkcode.com/blog/?p=996 Description: A bare-bones child theme for use with twentyfourteen Theme from <a href="https://www.ads-software.com/">Wordpress</a>. To use this Child Theme, you must have <a href="https://www.ads-software.com/themes/twentyfourteen/">twentyfourteen</a> parent theme installed. Author: Edward Zivkovic Author URI: https://hyperlinkcode.com/ Template: twentyfourteen Version: 1.0.0 */ /* Add Custom CSS after this line */ /* Demo Johnson Box code courtesy of: https://hyperlinkcode.com/blog/html-johnson-box/ */ .johnson1 { padding: 20px; background: #ffff99; width: 90%; margin: 20px auto; } .johnson6 { padding: 20px; background: #ffff99; width: 90%; margin: 20px auto; border: 3px dashed #ee0000; } .johnson8 { padding: 20px; background: #ccffcc; width: 90%; margin: 20px auto; border-left: 5px solid #ff8080; } /* Other Sample Code */ .warning { color: red; } .shadow { box-shadow: 0 8px 8px -6px #333; }
functions.php
<?php add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array('parent-style') ); }
It is my understanding(from the official wordpress docs) that the only required files are functions.php and style.css?
I know this is a thousandth repeat post, and it should be stupid simple, I just don’t seem to be hitting that lofty mark… haha. Help appreciated immensely!
- The topic ‘Known good child themes do not work on my site?’ is closed to new replies.