Joy
(@joyously)
I was hoping for a non plugin solution, I have to do this for sites that use our POS software, I don’t want to add the plugin on their sites
Joy
(@joyously)
The plugins typically just help you create the child theme. You don’t need the plugin after it’s created, I think.
Hi have the child theme it was not problem. I just need to figure out how to reference a stylesheet and php file so far I haven’t had any luck. I can put in the the parent function.php but it will get lost if it gets updated.
Joy
(@joyously)
That’s what the original links I gave you are for…
Your code looks like a plugin (comments). It goes in a particular place in a theme, on a particular action hook. That’s in the documentation.
Also, you can look at child themes from the repository and see how they do things. Read the code. It’s there for you to read.
There is real stuff between the comments and I found the code from that site. I have in in the function.php fine in the child theme directory. The php seems to be working now but the stylesheet doesn’t
require_once dirname( __FILE__ ) . ‘/plugins/myFile.php’;
function custom_style_sheet() {
wp_enqueue_style( ‘custom-styling’, get_stylesheet_directory_uri() . ‘/myStyle.css’ );
}
add_action(‘wp_enqueue_scripts’, ‘custom_style_sheet’);
I want to use myStyle.css in addition to the style.css from the parent.