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

Efficient way to edit WordPress themes

Delete DreamWeaver right now and do the following instead so that you can edit everything locally and see changes in real-time: 1) Install MAMP so you can run a server locally on your computer and then install WordPress as you normally would but in a local computer folder 2) Download SublimeText as your code editor. … Read more

How to make Custom Walker for wp_nav_menu() for materialize framework

I’ve made something like this: <div class=”navbar-fixed”> <nav> <div class=”nav-wrapper”> <a href=”#!” class=”brand-logo”><?php _e(‘Logo’, ‘newborn’); ?></a> <a href=”#” data-activates=”mobile-demo” class=”button-collapse”><i class=”mdi-navigation-menu”></i></a> <ul class=”right hide-on-med-and-down”> <?php wp_nav_menu( array( ‘theme_location’ => ‘primary-menu’ ) ); ?> </ul> <ul class=”side-nav” id=”mobile-demo”> <?php wp_nav_menu( array( ‘theme_location’ => ‘primary-menu’ ) ); ?> </ul> </div> </nav> </div> Plus this css: .menu ul{display: … Read more

Is there a default style.css

You can certainly use it, but it is not going to cover everything. Plus a lot of the style is going to depend on how you structure your content and other such items like your menus. If you are looking for just a blank stylesheet that contains all the default classes and such that WordPress … Read more

What controls responsiveness in WordPress?

WordPress has absolutely nothing to do with responsiveness, neither does themes or plugins. Responsiveness is controlled by media queries (CSS) set in stylesheets and the particular browser the site is viewed in. It is here where screen sizes are determined and checked against available media query rules. Just one note, older browsers like IE6, 7 … Read more

How the Css File is Linked without calling it in header.php?

The correct way to register styles in WordPress is to enque them through wp_enqueue_style function in your theme’s functions.php. You can read and learn how to do it here – wp_enqueue_style /** * Proper way to enqueue scripts and styles */ function wpdocs_theme_name_scripts() { wp_enqueue_style( ‘style-name’, get_stylesheet_uri() ); wp_enqueue_script( ‘script-name’, get_template_directory_uri() . ‘/js/example.js’, array(), ‘1.0.0’, … Read more

How to exclude certain code from style.css? [closed]

I would not suggest creating a child theme to override a single CSS line. You can simply use the theme customizer and add your CSS to the additional CSS box. Most CSS properties accept an unset or inherit value. So, you can paste the following code into the additional CSS box: @media (max-width: 991px) and … Read more

How/where to add additional stylesheet to WP

The WordPress API provides the functions wp_enqueue_style() and wp_enqueue_script() for including stylesheets and JavaScript. These functions should be used instead of hardcoding style or script tags within HTML. // Runs wpse_enqueue_styles() on the wp_enqueue_scripts() hook. // (Yes, we’re enqueuing a stylesheet here, but the proper hook is wp_enqueue_scripts. add_action( ‘wp_enqueue_scripts’, ‘wpse_enqueue_styles’ ); function wpse_enqueue_styles() { … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)