I want to include my style.css in function.php file?

You are calling the function wrong. You have not given your filename, just a directory. From the codex wp_enqueue_style( string $handle, string $src = false, array $deps = array(), string|bool|null $ver = false, string $media=”all” ) so in your case, you should enqueue like so add_action( ‘wp_enqueue_scripts’, ‘wpse_my_style’ ); function wpse_my_style(){ wp_enqueue_style( ‘my-style’, get_stylesheet_directory_uri() . … Read more

De-registering parent style sheet css recommended?

This is not a very smart thing to do. As you noted yourself, you’ll have issues when the parent theme is updated. Moreover, the parent theme might have secondary stylesheets that depend on the parent style (third parameter in wp_enqueue_style). There might be javascript that assumes it’s there. In other words: it will take very … Read more

Is it possible to use the featured image of a page as a css background without inlining?

There’s two possible options in creating a stylesheet from a dynamically generated value. The first options is Inline stylesheet, as follows: <div id=”hero” style=”background-image: url(<?php // TODO retrieve image here. ?>); “> </div> And the second options is to use an Internal stylesheet, and possibly the best solution out of both. Using stylesheet internally requires … Read more