Forum has been created to help all our customers in properly working our theme. We offer complete help with configuration theme and make default look, just like on our Be|theme demo. We don`t offer theme customization.


Before creating a new discussion, please:
1. Check on forum if discussion hasn`t been created before. Use the forum Search on the right.
2. Read carefully the documentation included to package.
3. If you didn`t find what you need and would like to post a new question click the "Start a New Discussion" button on the right.
4. You can post on forum only after registration (you need purchase code to register) .


NOTE!!! If you are starting a new topic and have got problems with your site and you want us to check what`s wrong please always give url to your site because without that we can`t check what`s wrong. Each case may be different because of your installed plugins, servers or other things.


IMPORTANT!!! Along with your inquiry, please attach the address of the page which concerns the question. This will cause the time to answer on your question will be much shorter. If you do not want to publish your address publicly in the forum, please send a private message. Thanks!

Child Theme will not override my Parent theme

Hello, and thanks for so a great Theme.

I just activate my child theme and start to play with the css. My Problem is that will just work if i put !important I know I´m doing something wrong but I don´t have any clue why is not working right.

I will appreciated if some one can help me. :)

Bye

/*
Theme Name: Betheme Child
Author: Muffin group
Description: Child Theme for Betheme - Premium WordPress Theme
Template: betheme
Version: 1
*/

@import url("../betheme/style.css");




/* Theme customization starts here
-------------------------------------------------------------- */

.custom-css-class { display:block;}

#Top_bar, .header-stack #Top_bar, .header-fixed #Top_bar, .header-below #Top_bar, #Header_creative, #Top_bar #menu {
background-color: #7e0016 !important;
}

#Top_bar .menu > li > a span:not(.description) {
display: block;
line-height: 60px;
padding: 0 20px;
white-space: nowrap;
border-right-width: 3px !Important;
border-style: solid;
}

Comments

  • Please sign in to see answear!
  • @import should not be used to import the parent stylesheet into the child theme. The correct method is to use wp_enqueue_style() to enqueue the parent stylesheet, using this code in your child theme's "functions.php":

    <?php

    add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
    function enqueue_child_theme_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style') );
    }
    So I have to include This code to make that work ?
    I will try if not I will work just with the parent theme 
  • Please sign in to see answear!
  • Hi,
    I'm following this conversation. So how would I get the site to recognize my child theme's css? Specifically, STYLE-STATIC.css in my child theme. I'd like it to override the parent theme's style-static.css. 

    I tried adding that script to my child theme's function.php but that didn't work. Can you help me?
  • Please sign in to see answear!
  • I'm running the same problem as marksuarez, i've put my css-static.css file in my child theme and it's not recognized. the site load the parent theme file. thanks for you help
  • Please sign in to see answear!
  • edited March 2015
    Okay so do i have to put the static-css file content inside my child theme style.css file to avoid being overwritten in the next theme update ?  

    edit: that what i did and it works perfectly :-) maybe there's something you can add to the documentation ?

    @marksuarez, simply paste the content inside your child theme style.css and it will work.




  • Please sign in to see answear!
Sign In or Register to comment.