• Resolved valci1

    (@valci1)


    Hello,
    I created the child theme
    style.css

    /*
    Theme Name: Ashe Child
    Theme URI: https://risvoltidicopertina.com/
    Description: Tema Child per il tema Ashe
    Author: Valeria Curseri
    Author URI: https://valeriacurseri.com/
    Template: ashe
    Text Domain: ashechild
    Version: 3
    */
    
    .entry-header {
    	height: 300px;
    }
    .header-logo a, .site-description {
        color: #ca9b52;
    }
    .site-description {
        display: inline-block;
        margin-top: 15px;
        margin-bottom: 0;
        font-size: 30px;
        line-height: 1.1;
    }
    .elementor-element.elementor-element-4c02cb6{
        margin-left: 25px;
        margin-right: 25px;
    	padding-top:10px;
    	padding-bottom:10px;
    }
    #subscribe_reloaded_email{
    	border-color:#e8e8e8;
    	box-shadow:none;
    	border: 1px solid #8e98a2;
    }
    #evf-submit-375{
    	border: none;
    	width: auto;
    	cursor: pointer;
    	font-weight: bold;
    	letter-spacing: 2px;
    	text-transform: uppercase;
        color: #ffffff;
        background-color: #333333;
    	padding:13px;
        font-size: 14px;
        font-family: 'Open Sans';
    	border-radius: 0;
    }
    #evf-submit-375:hover{
        color: #ffffff;
    	background:#ca9b52;
    }

    function.php

    <?php
    
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' );
    
    function enqueue_parent_theme_style() {
    
        $parent_style = 'ashe-style';
        
        wp_enqueue_style( $parent_style, get_template_directory_uri().'/style.css' );
        wp_enqueue_style( 'ashe-child',
            get_stylesheet_directory_uri().'/style.css',
            array($parent_style),
            wp_get_theme()->get('Version')
        );
    
    }

    and the site first loads the css of the parent theme and then that of the child theme. despite this, the changes inserted in the style.css file within the child theme are not taken.
    Because? What else should I do?
    Thanks

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @valci1

    At first, thank you for choosing our theme and service.

    I will redirect this topic to the developer’s board and they will contact you.

    Kind Regards

    Theme Author WP Royal

    (@wproyal)

    Hi,

    In your functions.php file, you just need to have this code

    <?php
    
    /**
     * Enqueue Styles
     */
    
    function ashe_child_enqueue_styles() {
    	wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }
    
    add_action( 'wp_enqueue_scripts', 'ashe_child_enqueue_styles' );

    Kind Regards

    Thread Starter valci1

    (@valci1)

    Hi,

    I put that in my function.php inside my child theme but it didn’t work.
    Is that right?

    Thanks

    Hi @valci1

    Please try to use child theme downloaded from this link: https://wp-royal.com/themes/ashe/docs/#childthemes

    Kind Regards

    Thread Starter valci1

    (@valci1)

    Hi,

    I don’t understand why, but it doesn’t work.

    My style.css file in child theme is:

    /*
    Theme Name: Ashe Child
    Template: ashe
    Theme URI: https://wp-royal.com/
    Author: Royal Flush
    Author URI: https://wp-royal.com/
    Description: Clean and Minimalist blogging theme.
    Version: 1.0
    License: GPLv3 or later
    License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
    Text Domain: 
    Tags: blog, e-commerce, food-and-drink, one-column, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, custom-logo, featured-images, footer-widgets, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
    */
    
    /*--------------------------------------------------------------
     You Custom Code Goes Here
    --------------------------------------------------------------*/
    .entry-header {
    	height: 300px;
    }
    .header-logo a, .site-description {
        color: #ca9b52;
    }
    .site-description {
        display: inline-block;
        margin-top: 15px;
        margin-bottom: 0;
        font-size: 30px;
        line-height: 1.1;
    }
    .elementor-element.elementor-element-4c02cb6{
        margin-left: 25px;
        margin-right: 25px;
    	padding-top:10px;
    	padding-bottom:10px;
    }
    #subscribe_reloaded_email{
    	border-color:#e8e8e8;
    	box-shadow:none;
    	border: 1px solid #8e98a2;
    }
    #evf-submit-375{
    	border: none;
    	width: auto;
    	cursor: pointer;
    	font-weight: bold;
    	letter-spacing: 2px;
    	text-transform: uppercase;
        color: #ffffff;
        background-color: #333333;
    	padding:13px;
        font-size: 14px;
        font-family: 'Open Sans';
    	border-radius: 0;
    }
    #evf-submit-375:hover{
        color: #ffffff;
    	background:#ca9b52;
    }

    Hi @valci1

    At first, sorry for the late reply, we had holidays.

    I will redirect this topic to the developer’s board and they will contact you.

    Kind Regards

    Hi @valci1

    In the CSS codes, you shared you need to add !important after all the styles which are not displaying on live site to override theme ones.

    Kind Regards

    Theme Author WP Royal

    (@wproyal)

    Hi,

    If you have any other Questions feel free to open a new Forum Support Topic and we will do our Best to help you.

    Kind Regards,
    Nick

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘CSS from child theme isn’t working’ is closed to new replies.