• Resolved Jordi

    (@kukat)


    Hi! I’m going crazy with this…

    I’m customizing the “Premier” WordPress theme. I do a child-theme:

    folder “premier-child” inside “themes”:

    a functions.php like this:

    "<?php
    /**
     * premier functions and definitions
     *
     * @package premier
     * @since premier 1.0
     */
    
    /**
     * Set the content width based on the theme's design and stylesheet.
     *
     * @since premier 1.0
     */
    
     
    
     add_action( 'wp_enqueue_scripts', 'premierchild_enqueue_styles' );
    
    function premierchild_enqueue_styles() {
        
        
        wp_enqueue_style(
            'premier',
            get_template_directory_uri() . '/style.css',
            array(),
            '1.0'
        );
    
        wp_enqueue_style(
            'premier-marro',
            get_stylesheet_directory_uri() . ( 'css/brown.css' ),
            array( 'premier' ),
            '1.0'
        );
    
       
    
    }
    ?>

    And I created a “functions” folder with the file “customizer_styles.php” inside, like on the parent theme.

    I delete the line:
    <link rel="stylesheet" href="<?php echo get_template_directory_uri();?>/css/<?php echo esc_attr(strtolower( get_theme_mod( 'premier_color_scheme', 'red' ) ) ); ?>.css" type="text/css" media="screen">

    But this line stills appears. What I’m doing wrong??? I thought that, working with a child theme, it was enough keeping the original structure.
    Thanks!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • It looks like it’s added via this hook:

    add_action( 'wp_head', 'premier_customizer_css' );

    If you want to overwrite it in your child theme, you would need to copy the contents of the file itself and move it into your child theme functions file, remove the parent themes hook, and add your own:

    function premier_child_customizer_css() {
        /* Parent Theme code here */
    }
    remove_action( 'wp_head', 'premier_customizer_css' );
    add_action( 'wp_head', 'premier_child_customizer_css' );
Viewing 1 replies (of 1 total)

The topic ‘Delete function inside a child theme in Premier Theme?’ is closed to new replies.