• Resolved rich.h.worley

    (@richhworley)


    The CSS in my child theme will not override the parent theme. I’m assuming this is the problem but I could be wrong. All the CSS I put into my child theme is not working. May you please help me figure this out? Thank you so much!

    Below is my website and a copy of the code in my child theme style.css…

    https://www.virahound.com

    /*
    Theme Name: Simplo Child
    Template: simplo
    */
    @import url(“../simplo/style.css”);

    #topSocial {
    font-weight:bold;
    font-size:20px;
    color:#3b5998;
    }

    .postItem h1 a{
    color:#3b5998;
    }

Viewing 15 replies - 1 through 15 (of 23 total)
  • hey there

    i looked at the text near your facebook icon at the top and i agree your child theme’s css is not applying

    then i inspected all css files on the site and the child theme does not appear to be accessed. can you please double check which theme is selected in Dashboard->Appearance->Themes? If the child is not currently selected, please select it and retest

    Thread Starter rich.h.worley

    (@richhworley)

    Yes, the child theme is selected. Any other ideas?

    This is what shows up on your site :

    https://www.virahound.com/wp-content/themes/simplo/style.css"

    That would show the child theme if it were active. Can you double check that?

    And can you please show use the contents of the child themes functions.php?

    Thread Starter rich.h.worley

    (@richhworley)

    Yes the hcild theme is definitely selected. I did not put a functions.php into my child theme. Could that be why this is not working?

    it’s not a required file, but it is used to enqueue these pieces

    if you’re up for it, try making a functions.php in your child-theme dir

    look for the section on functions.php here for some guidance

    and are you running wp 4.1.1, theme current, plugins current?

    any caching plugins? might be worth purging the cache by hand

    Thread Starter rich.h.worley

    (@richhworley)

    Yes, I’m running wp 4.1.1 and made sure all my plugins are current. No caching plugin but I cleared the cache in the browser and it’s still the same. I also tried 2 other browsers to be sure. I’ve been attempting to “enqueue” the pieces with a functions.php file but keep breaking my site. Below is the 1st 36 lines of code in my php file.. are you able to tell what I’m doing wrong?

    <?php

    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );

    }
    /*******************************
    CUSTOM BACKGROUND SUPPORT
    ********************************/
    add_custom_background();

    /*******************************
    MENUS SUPPORT
    ********************************/
    if ( function_exists( ‘wp_nav_menu’ ) ){
    if (function_exists(‘add_theme_support’)) {
    add_theme_support(‘nav-menus’);
    add_action( ‘init’, ‘register_my_menus’ );
    function register_my_menus() {
    register_nav_menus(
    array(
    ‘main-menu’ => __( ‘Main Menu’ )
    )
    );
    }
    }
    }

    /* CallBack functions for menus in case of earlier than 3.0 WordPress version or if no menu is set yet*/

    function primarymenu(){ ?>
    <div id=”topMenu”>
    You need to set up the menu from WordPress admin.
    </div>
    <?php }

    that looks like more than what i’d expect in a brand new child-theme’s function.php but ok!

    let’s detour another route here because there is something i’m not understanding about either your theme or setup and i think you just want your css to work ??

    mind moving what you have in your child theme’s stylesheet to custom css plugin and seeing what happens?

    Thread Starter rich.h.worley

    (@richhworley)

    I’m really curious as to why the child theme isn’t overwriting the parent. It’s activated and the CSS code is correct. I made edits to the header.php file in my child theme and the changes overwrote the parent. However, none of the edits I made in the style.css file are overwriting.

    Thank you for the suggestion to just use the custom plugin. That’ll be my last resort. I’d really like to stay the course with my child theme and figure out the issue. My main objective here is to learn ??

    Your site does NOT have a child theme active.

    BTW, have you asked the developer of your theme for help with this – as that’s a commercial theme, that’s likely the best place for help since it appears to be a more complicated situation than simply CSS not working –

    https://codex.www.ads-software.com/Forum_Welcome#Commercial_Products

    Thread Starter rich.h.worley

    (@richhworley)

    My wordpress site says the child theme is active. Below is my login. Do you mind taking a look?

    https://www.virahound.com/wp-admin

    [redacted]

    Oh gosh, you need to change that info right away – this is a very public forum – and indexed immediately by search engines! Not a good idea to post that info here.

    And we don’t provide that level of support here, sorry.

    Thread Starter rich.h.worley

    (@richhworley)

    the developer of my theme doesn’t offer premium support. It’s a free theme. Looks like my login info has been deleted. Anyway I can send it to you?

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘CSS in child theme not over riding parent’ is closed to new replies.