• meidanm95

    (@meidanm95)


    Hi
    So I created my theme with Child theme plugin after trying this method:
    https://docs.oceanwp.org/article/90-sample-child-theme
    and still the child style.css doesn’t work.

    I tried to fix it with some search and nothing helps, but I think it’s somthing I’m doing wrong in my functions.php that works fine. please help me!
    functions.php:

    <?php
    // Exit if accessed directly
    if ( !defined( 'ABSPATH' ) ) exit;
    
    // BEGIN ENQUEUE PARENT ACTION
    // AUTO GENERATED - Do not modify or remove comment markers above or below:
    
    if ( !function_exists( 'chld_thm_cfg_locale_css' ) ):
        function chld_thm_cfg_locale_css( $uri ){
            if ( empty( $uri ) && is_rtl() && file_exists( get_template_directory() . '/rtl.css' ) )
                $uri = get_template_directory_uri() . '/rtl.css';
            return $uri;
        }
    endif;
    add_filter( 'locale_stylesheet_uri', 'chld_thm_cfg_locale_css' );
             
    if ( !function_exists( 'child_theme_configurator_css' ) ):
        function child_theme_configurator_css() {
            wp_enqueue_style( 'chld_thm_cfg_child', trailingslashit( get_stylesheet_directory_uri() ) . 'style.css', array( 'oceanwp-woo-mini-cart','font-awesome','simple-line-icons','magnific-popup','slick','oceanwp-style' ) );
        }
    endif;
    add_action( 'wp_enqueue_scripts', 'child_theme_configurator_css', 10 );
    
    // END ENQUEUE PARENT ACTION
    /**
     * Add new social options in the Customizer
     */
    function my_ocean_social_options( $array ) {
    
    	// Telegram icon
    	$array['telegram'] = array(
    		'label' => 'Telegram',
    		'icon_class' => 'fab fa-telegram',
    	);
    
    	// Return
    	return $array;
    
    }
    add_filter( 'ocean_social_options', 'my_ocean_social_options' );
    ?>

    style.css:

    /*
    Theme Name: OceanWP Child
    Theme URI: https://oceanwp.org/
    Text Domain: oceanwp-child
    Template: oceanwp
    Author: Nick
    Author URI: https://oceanwp.org/about-me/
    Description: OceanWP Child
    Tags: two-columns,right-sidebar,footer-widgets,blog,news,custom-background,custom-menu,post-formats,rtl-language-support,sticky-post,editor-style,threaded-comments,translation-ready,buddypress,custom-colors,featured-images,full-width-template,theme-options,e-commerce
    Version: 2.0.0.1605958369
    Updated: 2020-11-21 13:32:49
    
    */

    Thank you :]

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Child theme CSS is not working’ is closed to new replies.