Title: child theme css doesnot work
Last modified: December 28, 2021

---

# child theme css doesnot work

 *  [rdcc34](https://wordpress.org/support/users/rdcc34/)
 * (@rdcc34)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/child-theme-css-doesnot-work/)
 * child theme css doesnot work, what can i do.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fchild-theme-css-doesnot-work%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Shahin](https://wordpress.org/support/users/skalanter/)
 * (@skalanter)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/child-theme-css-doesnot-work/#post-15202057)
 * Hello [@rdcc34](https://wordpress.org/support/users/rdcc34/),
 * You can use this function to load the style.css file on the child theme.
 *     ```
       function oceanwp_child_enqueue_parent_style() {
   
       	// Dynamically get version number of the parent stylesheet (lets browsers re-cache your stylesheet when you update the 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 function is the primary function for loading style sheets on the child theme:
   
   [https://github.com/oceanwp/oceanwp-child-theme/blob/master/functions.php](https://github.com/oceanwp/oceanwp-child-theme/blob/master/functions.php)
 * Also, please follow the steps explained in this link:
    [https://developer.wordpress.org/themes/advanced-topics/child-themes/#:~:text=Top%20%E2%86%91-,Enqueueing%20Styles%20and%20Scripts,-%23](https://developer.wordpress.org/themes/advanced-topics/child-themes/#:~:text=Top%20%E2%86%91-,Enqueueing%20Styles%20and%20Scripts,-%23)
 * Best Regards

Viewing 1 replies (of 1 total)

The topic ‘child theme css doesnot work’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/oceanwp/4.1.6/screenshot.png)
 * OceanWP
 * [Support Threads](https://wordpress.org/support/theme/oceanwp/)
 * [Active Topics](https://wordpress.org/support/theme/oceanwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/oceanwp/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/oceanwp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Shahin](https://wordpress.org/support/users/skalanter/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/child-theme-css-doesnot-work/#post-15202057)
 * Status: not resolved