• Resolved Mr. L

    (@456he4v5454bg5g4)


    There are few answers on this matter, not a single one works because I am doing something wrong. Using ocean WP theme demands custom CSS within a builder because child theme CSS simply isn’t pulled. How to fix this? I would like to place custom CSS within the child theme CSS file.

    Please if you answer, make the answer complete, not just partial. This code I added does not do the job and simply does not load child folder style.CSS. Do I need to remove parts of code in functions.php?

    A child theme is downloaded from GitHub.

    Since this is a bit of “negative” approach, I must say OCEANWP is in my opinion best WP theme. Even more so After issues with Astra.

    Thank you and kind regards.

    LG

    /**
     * Child theme functions
     *
     * When using a child theme (see http://codex.wordpress.org/Theme_Development
     * and http://codex.wordpress.org/Child_Themes), you can override certain
     * functions (those wrapped in a function_exists() call) by defining them first
     * in your child theme's functions.php file. The child theme's functions.php
     * file is included before the parent theme's file, so the child theme
     * functions would be used.
     *
     * Text Domain: oceanwp
     * @link http://codex.wordpress.org/Plugin_API
     *
     */
    
    /**
     * Load the parent style.css file
     *
     * @link http://codex.wordpress.org/Child_Themes
     */
    function oceanwp_child_enqueue_parent_style() {
    	// Dynamically get version number of the parent stylesheet (lets browsers re-cache your stylesheet when you update your theme)
    	$theme   = wp_get_theme( 'OceanWP' );
    	$version = $theme->get( 'Version' );
    	// Load the stylesheet
    	wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'oceanwp-style' ), $version );
    	
    }
    add_action( 'wp_enqueue_scripts', 'oceanwp_child_enqueue_parent_style' );
    • This topic was modified 4 years, 1 month ago by Mr. L.
    • This topic was modified 4 years, 1 month ago by Mr. L.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    you have downloaded it from the right place. On Github, you will get our official child theme.
    No need to remove the code from the functions.php file.
    Please try to check with the !important tag, it may be the priority issue.

    If it is not resolved. can you share the Page URL and the code that you are trying to ass in CSS?

    Thread Starter Mr. L

    (@456he4v5454bg5g4)

    Dear Abhishek

    I forgot to click it is solved. I apologize.

    How did you solve the issue?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CHILD THEME CSS NOT WORKING’ is closed to new replies.