How to Enqueue the style.css

//Stylesheet and script inclusion function add_theme_scripts() { $theme_data = wp_get_theme(); wp_enqueue_style(‘main-style’, get_template_directory_uri() . ‘/style.css’, ”, $theme_data[‘version’], ‘all’); } add_action( ‘wp_enqueue_scripts’, ‘add_theme_scripts’ );

Published
Categorized as Wordpress

Why wp_enqueue_style() not Working?

First step is to ensure you are using the correct path of the CSS file. For the responsive Directory use Example: The second step is to ensure that wp_head() is being called on the page you are displaying. It can be placed in your header template (in between <head></head tags) or on top of archives/post files etc.… Continue reading Why wp_enqueue_style() not Working?

WP Rocket – WordPress caching plugin

WP Rocket is a premium cache plugin for WordPress.  It doesn’t require configuration; as soon as you turn it on, your website will start to gain the following advantages: Static HTML version of your content cached for desktop and mobile devices Browser caching Cross-Origin support for web fonts  Detection and support of various third-party plugins, themes, and hosting environments Combination of inline and 3rd party scripts WooCommerce Refresh Cart Fragments Cache CACHE You… Continue reading WP Rocket – WordPress caching plugin

MetaSlider Plugin in WordPress

The ideal slider plugin for any WordPress website is MetaSlider. We can create Image Slides, Video Slides, Layer Slides, Product Slides, Post Feed Slides, HTML Slides, and Carousel Slides. Basics steps to include MetaSlider in a WordPress website: Install MetaSlider plugin In its dashboard, choose slider format and add sliders. For full width, recommend that… Continue reading MetaSlider Plugin in WordPress

How to enqueue style.css file in WordPress theme

It is best to combine all enqueued scripts and styles into a single function, and then call them using the wp_enqueue_scripts action. add_theme_scripts() → Any name can be used for naming the function get_stylesheet_uri() → This function automatically finds the style.css file in the theme folder and outs its URL.

Redirect HTTP to HTTPS on Apache Virtual Host

Additionally, to force all web traffic to use HTTPS, you can also configure your virtual host file. Normally, there are two important sections of a virtual host configurations if an SSL certificate is enabled; the first contains configurations for the non-secure port 80. The second is for the secure port 443. To redirect HTTP to HTTPS for all… Continue reading Redirect HTTP to HTTPS on Apache Virtual Host