Where to place css when adding child theme
-
Hello,
I just changed themes to AccessPress Ray. I made the mistake of changing some things in the style editor. Now it’s showing I need to update the theme and I don’t want to lose my changes.
1. I’m trying to add the child theme before I update. I’ve used the following and put it in the theme options customs css and saved it. There is also another css editor that is not within the theme options. Do I add this to both custom css areas?
/*
Theme Name: AccessPress Ray
Theme URI: https://joyfulgiftsbyjulie.biz/accesspress-ray-child/
Description: AccessPress Ray Theme
Author: Julie Tucker
Author URI: https://julietucker.com
Template: AccessPress Ray
Version: 1.0.0
/*2. Also, I don’t have an author URI or don’t know where to find it. I’m not sure if this link is correct.
3. I need to enqueue the parent theme stylesheet. Where do I add this? In the custom css where I added the child theme or the themes function php? If I add it to the function php, where within that do I add it.
Here is the code provided by wp. Do I change the words theme to my theme or leave the code as is?
<?php
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );}
?>Ps I have not activated it yet.
Thank You!
- The topic ‘Where to place css when adding child theme’ is closed to new replies.