How does a Child Theme works?

You are correct, that WordPress will load the style.css file from your parent theme first, and then the style.css from your child theme. These means because of how CSS itself works, you have to specifically override any rule you wish to override. What this means is that you would need to modify the CSS within … Read more

Add a custom stylesheet for BlackBerry

Well… You’ve already used wp_enqueue_style. Use it again. That is the canonical mechanism for loading stylesheets either by itself or in combination with wp_register_style wp_enqueue_style(‘blackberry’,get_stylesheet_directory_uri().’/path/to/blackberry.css’); I feel compelled to note that user agent sniffing is not especially reliable. Is it not possible to do this with media queries? Reference http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri

How do the default themes reference style.css?

The stylesheet is registered and enqueued by a function called twentyfourteen_scripts() in the theme’s functions.php. Callbacks hooked into the style loader/dependency system will be echoed on the wp_head action in the wp_head() function. Which, by the way, is how you should be loading your own stylesheets. There is a similar system for scripts.

Use stylesheet from a different location

Create a theme’s style.css as normal but just include the header information. This will be a config file only. The register and enqueue your stylesheet(s). You can use any path you’d like. I think this is what you need: function register_theme_styles() { wp_register_style( ‘theme-styles’, site_url( ‘/css/site.css’ ) ); wp_enqueue_style( ‘theme-styles’ ); } add_action( ‘wp_enqueue_scripts’, ‘register_theme_styles’ … Read more

Remove id attribute from stylesheet link

You can filter style_loader_tag. You get the HTML element and the handle as arguments. Example add_filter( ‘style_loader_tag’, function( $html, $handle ) { if ( ‘custom-stylesheet’ !== $handle ) return $html; return str_replace( ” id=’$handle-css'”, ”, $html ); }, 10, 2 ); But really, I would not waste processing time for that. The id exists to … Read more