Son theme is not overlapping parent theme in Wordpress

Asked

Viewed 36 times

0

I’m putting the code in the theme son but it’s not overlapping the theme Father.

Function.php:

add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' ); 

function enqueue_parent_styles() { 
  wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); 
} 
function is_child_theme() {
    return ( TEMPLATEPATH !== STYLESHEETPATH );
}

Second way I tried:

/*add_action('wp_enqueue_scripts', function() {
 //Informa a localizacao do css do tema pai
 wp_register_style('salient', get_template_directory_uri() . '/style.css', array());

 //Informa a localizacao do css do tema filho
 wp_register_style('salient-child', get_stylesheet_directory_uri() . '/style.css', array('salient'));
 wp_enqueue_style('salient-child');
});

This one wasn’t getting it either

/*Código para carregar header do orçamento online antes do style pai na page-orcamento-online.php */
/*add_action( 'wp_enqueue_scripts', 'enqueue_styles' ); 

function enqueue_styles() { 
  wp_enqueue_style( 'style', get_template_directory_uri().'/header-orcamento-online.css' ); 
}

Style.css

/* 
Theme Name: Salient Child 
Theme URL: http://www.themenectar.com
Author: ThemeNectar
Author URI: http://themenectar.com
Description: Salient Child Theme 
Template: salient
Version: 8.0.15
Text Domain: salient-child 
License: GNU General Public License version 3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
@media screen {
    body {
        background-color: black;
    }
    header {
        background-color: black;
        display: block;
        width: 30% !important;
        height: 100% !important;
    }

}

I put something just to see if it changed the style but it didn’t work

  • This should give you a light https://www.youtube.com/watch?v=PtHZSFJ6JRs

  • Thank you very much!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.