• Resolved x.charisma

    (@xcharisma)


    I’m trying to create a child theme based on Ambrosia, however the child style.css is not overriding the parent theme’s would anyone happen to have a tutorial or solution as to how I could try and fix this problem?

    if it helps, here is my site as of right now https://www.lifeisconfetti.com/wordpress/

    I have tried adding only a child stylesheet with no child php files, but the stylesheet still doesn’t apply.

    Rina

Viewing 12 replies - 1 through 12 (of 12 total)
  • I didn’t see any sign of child theme used in your site.

    Did you activate your child theme ?

    Did you put the style.css of child theme inside child theme’s folder ?

    Thread Starter x.charisma

    (@xcharisma)

    Yes I did

    and within the child theme style.css, i imported the parent style.css and looking at https://www.venutip.com/content/right-way-override-theme-functions

    I tried the following:

    // Removes thematic_blogtitle from the thematic_header phase
    function remove_ambrosia_actions() {
        remove_action('get_header','ambrosia_load_styles',3);
    }
    // Call 'remove_thematic_actions' during WP initialization
    add_action('init','remove_ambrosia_actions');
    
    // Add our custom function to the 'thematic_header' phase
    add_action('get_header','new_load_styles', 3);
    
    // Load CSS
    function new_load_styles() {
    	if (!is_admin()) {
    		wp_enqueue_style('fontapi', 'https://fonts.googleapis.com/css?family=Ubuntu:regular,italic,bold,bolditalic&subset=greek,latin');
    		wp_enqueue_style('main', get_stylesheet_directory_uri() . '/style.css');
    	}
    }

    which didn’t crash the styling, however it still doesn’t make the child style override the parent

    Thread Starter x.charisma

    (@xcharisma)

    I know the child theme is working because I’ve changed the custom 2 menus (provided by ambrosia) into 5 menus. It’s just the stylesheet thats completely ineffective

    what’s the folder name of your child theme ?

    There is a missing } in line 16 of your child’s style.css

    Thread Starter x.charisma

    (@xcharisma)

    folder name of child theme is confettitheme

    thank you, I added in the } I think it may be working now as the background has disappeared, however its not retrieving the image that should be in the background now. My images are inside /confettitheme/images/

    And the color:#green; in footer p.copy must be just green.

    But I think the missing } in line 16 is the reason why the rest of it woulnd’t get read, the validator says Parse Error.

    For image problem, check the file name (capital letter).

    In your CSS it’s calling for this logo_motto.png, but your actual file is Logo_motto.png

    Thread Starter x.charisma

    (@xcharisma)

    Thank you,

    it’s still not loading my images properly. When viewing resources, there’s 2 logo.png from different paths (probably my fault somewhere down the line), and its looking at the right place for my background.png however it’s not loading the image anyway, would you have any idea as to why?

    Edit: turns out its a capitalisation problem again. it is now loading the image properly.

    Thank you so much for your help! Was stuck on this for way too long!

    Thread Starter x.charisma

    (@xcharisma)

    Turns out ambrosia theme works fine as a parent theme (thus far) :’)

    One thing though, you have to optimize that bg image, you can’t use a 3.7M image as a web bg.

    Thread Starter x.charisma

    (@xcharisma)

    Yes…I just realised image size is probably why its loading so incredibly slow at the moment. Thank you again for all the help you’ve given me!such a lifesaver!!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘child stylesheet not overriding parent’ is closed to new replies.