Total newbie here!
I have created a child theme folder (twentyseventeen-child) in the themes folder.
Inside the child theme folder, I have created a style.css file and a functions.php file.
It looks like my style.css and functions.php file aren’t being called properly.
What have I done wrong?
functions.php file....
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"));
}
function hsl_breadcrumbs()
{
...my code here (tested this function in main theme functions.php file and it works.
}
.style.css file....
/*
Theme Name: Twenty Seventeen Child Theme
Author: KW
Template: twentyseventeen
Version: 1.0.0
*/
/* HSL Breacrumb Navigation */
.breadcrumb{
width:645px;
float:left;
padding:0 0 0 47px;
margin:9px 0 0 0;
font-size:90%;
clear:both;
}
.delimiter{
color:#000;
background-color:inherit;
}
.delimiter1{
color: #627FC3;
background-color:inherit;
}
]]>
I wrote a function called hsl_breadcrumbs.
To display the results of this function, I installed a plugin called “PHP Code Widget”.
In the widgets area, I added a new text widget to the Blog Sidebar and added in
the code below:
<?php
if (function_exists('hsl_breadcrumbs')) {hsl_breadcrumbs();}
?>
When I added the function hsl_breadcrumbs() to the functions.php file located in the “Twenty Seventeen” directory, the breacrumbs displayed.
When I removed that function from the “Twenty Seventeen” functions.php file and added it in to the child theme, it stopped working.
]]>Yes, I did activate the theme!
I commented out everything in the hsl_breadcrumb function in the child theme and
then added in an echo line….
and nothing showed up
]]>And can you double-check the names of the files? They must be ‘style.css’ and ‘functions.php’.
Also, do you have any caching?
]]>I am running this site locally at: https://localhost/mysite/
My child theme is located in the themes folder and is called: twentyseventeen-child
File names are:
functions.php
style.css
No caching.
]]>ok did it -below is link
]]>