• Resolved Nientje07

    (@nientje07)


    How do I make a child theme for this theme? I tried the way I normaly do it and it seems to work. But the chanves I make in a css file aren’t doing anything…

Viewing 6 replies - 1 through 6 (of 6 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you link your site with the Child Theme active?

    Thread Starter Nientje07

    (@nientje07)

    Thank you for your reply. Unfortunately I can’t give you a link to the site because the site is only accessible internally… :-s

    Thread Starter Nientje07

    (@nientje07)

    I have made a new folder –> ascent-child
    I’ve put a style.css in it with following header:

    @import url("../ascent/style.css");
    /* ------------------------------------------------------
    Theme Name:     XXXX
    Theme URI:
    Description:    Child theme for the ascent theme
    Author:         Nina
    Author URI:
    Template:       ascent
    Version:        0.1.0
    -----------------------------------------------------------*/

    The theme works. I can see my site without any problems. I just can’t change anything about the look of the site. When I put something in a the css, nothing happens. It keeps refering to the css of the parent theme.

    Thread Starter Nientje07

    (@nientje07)

    Also, now I have switched back to the parent theme and I want to change something in the css file using the build in editor in WordPress nothing changes.

    It can’t be that I have to edit the main.css of the parent theme?

    Can anyone please help me?

    Theme Author Pitabas

    (@pitabas106)

    Hi Nientje07,

    You can add the below code inside your child theme’s functions.php

    function ascent_high_priority_style() {
    	if (is_child_theme()) {
    	    wp_enqueue_style('child-custom-css', get_stylesheet_directory_uri() . '/child-custom.css', array(), '1.0.9', 'all');
    	}
        }
        add_action( 'wp_enqueue_scripts', 'ascent_high_priority_style', '999' );

    Then create a CSS file name ‘child-custom.css’ inside your child theme. Inside this ‘child-custom.css’ file you can add your custom style.

    Thread Starter Nientje07

    (@nientje07)

    That worked!! thanks a lot!! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Child Theme’ is closed to new replies.