All Questions
Tagged with css wp-enqueue-style
195 questions
0
votes
0
answers
40
views
CSS style and app.js not loading
I'm brand new at theme development.
My directory is the following:
I should see, in the page source (even if I have a blank page) the app.js loaded, but I don't.
This is what I see:
what is wrong in ...
19
votes
5
answers
31k
views
Style custom columns in admin panels (especially to adjust column cell widths)
I am using Wordpress as a CMS for a project which makes extensive use of custom post types. I need to display columns in admin panels for each custom post type in a different way.
I've already ...
2
votes
3
answers
2k
views
"wp_enqueue_style();" don't load new edited style
First, sorry my english. I am using Local by flywheel to manager my site files and my wordpress version is 4.9.4.
Here is the problem, When I use
wp_enqueue_style('wharever', get_stylesheet_uri());
...
0
votes
1
answer
66
views
Stylesheet does not load despite functions.php
I am calling my stylesheet styles.css within functions.php. Also adding add_action. But it does not work…
<?php
function myBlog_files() {
wp_enqueue_style('styles', get_stylesheet_uri());
}
...
2
votes
1
answer
2k
views
Enqueue style for Password Reset page
I've enqueued a style for my WordPress login page like so:
function login_stylesheet() {
wp_enqueue_style( 'custom-login', plugins_url( 'style-login.css', __FILE__ ) );
}
add_action( '...
2
votes
3
answers
11k
views
Prevent CSS/JS loading when plugin is not used
I have a Wordpress theme (the7) that includes the Visual Composer plugin. This is good for my clients editing stuff in the back end, but it also adds unnecessary CSS and JS to every page load on the ...
1
vote
1
answer
580
views
Dequeue a style file which is making website load slow!
I have a website running on GrandNews WordPress Theme (https://themeforest.net/item/grand-news-news-magazine/15885465) and loading via KeyCDN. The site is loading a CSS file located at websitedomain....
0
votes
1
answer
197
views
Bootstrap Integtration
I wonder how can I integrate only bootstrap 4 grid system instead of :
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-...
12
votes
2
answers
25k
views
Inbuilt style for jquery-ui-datepicker
I want to use the datepicker that gets bundled with WordPress on the front end of a website. I enqueued jquery-ui-datepicker but the datepicker isn't styled(no js error in console). Is there a ...
1
vote
1
answer
786
views
why enqueued styles in header.php shows in footer?
I`m using this code in functions.php:
add_action('wp_head', 'addMyStyle');
function addMyStyle() {
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css', false, '1.0',...
0
votes
1
answer
153
views
Plugin and themes are adding the same stylesheets
/vendors/font-awesome/font-awesome.min.css? ver=2.9.10
/yith-woocommerce-wishlist/assets/css/font-awesome.min.css? ver=4.7.0
/theme/css/font-awesome.min.css
**this csss are from different ...
3
votes
2
answers
6k
views
How to force stylesheet to load before anything else in header?
I need a stylesheet to be added to the header before anything else. That means before any styles or scripts that are automatically added by any of the plugins I'm also using.
I figured I could add ...
0
votes
2
answers
2k
views
functions.php - inject inline css from file
I would like to read from a .css file and inject it as an inline style in wp_head. it's possible?
i've tried this "Add inline css to theme" solution but it doesn't do what I expect because I expect ...
0
votes
1
answer
41
views
Set different css stylesheet for specific pages [duplicate]
Is it possible to assign a css stylesheet to specific pages only?
If so how?
Can I use something like this? Not sure how to specify the pages though?
add_action( 'wp_enqueue_scripts', '...
0
votes
1
answer
416
views
How to NOT override inline css rules
I had to dequeue the style.css parent theme file and requeued a copy without the @media rule for the menu from my child folder with a priority of 11.
But now this new style is overriding inline rules....
0
votes
1
answer
322
views
My Child Theme CSS Isn't Working
I have a child theme of the twenty seventeen theme. The problem i'm having is that my child theme css isn't working. I have checked the page source and the css file for my child theme is loading but ...
0
votes
1
answer
36
views
Can't Workout Dependency of Stylesheets
I have enqueued a new stylesheet rk.css Ultimately I want it to load last after all other plugin css etc to override any css.
I have the following in my functions.php of my child theme:
add_action( '...
0
votes
1
answer
718
views
Append style tag in head while shortcode runs
I have a plugin with shortcode. Shortcode returns some html in page. I will have some dynamically generated css that I want to place in the page as well. I tried using wp_add_inline_style (to hook to ...
6
votes
3
answers
38k
views
Give priority to child theme stylesheet
I've created a child theme and the main style.css works perfectly fine. However, the parent theme has another stylesheet which I want to import and create the same for child theme and use it instead.
...
0
votes
3
answers
7k
views
Load CSS in footer, like your can with JS?
I'm loading some third party CSS with the help of wp_enqueue_style. I would like this CSS to be loaded in the footer, so it does not block rendering of the page. This would be fine, since this CSS is ...
20
votes
2
answers
13k
views
How to add crossorigin and integrity to wp_register_style? (Font Awesome 5)
I am upgrading Font Awesome 4 to version 5 which introduces both integrity and crossorigin attributes to the <link rel="stylesheet"> markup.
Currently, I am using:
wp_register_style('...
0
votes
1
answer
4k
views
Homepage not loading correctly, but then loads when refreshing
When going to our homepage (www.whiteskitchen.co.uk). We seem to have lost the styling on the homepage. I checked the source code and it’s not fully loading the page.
When you refresh the page or ...
0
votes
1
answer
43
views
Font size decreases when child theme is created from parent theme?
While creating and activating the child theme, the font size decreases as compared to parent theme
<?php function my_theme_enqueue_styles() {
$parent_style = 'spicepress-style'; // This is '...
1
vote
1
answer
3k
views
Stylesheet Enqueue Order and Best Practices
i would like to do the following:
customize a theme to my likings for use on several sites and installations. so i can make "global" changes (via own plugin?)
then i would like to have a site ...
0
votes
1
answer
933
views
CSS getting injected into index from somewhere after theme/custom CSS is loaded, overriding all of my CSS [closed]
Using the inspector tool i can see that some CSS is getting injected/generated from somewhere (which i don't know where) which is overriding my own css.
I've tried several things from using a child ...
2
votes
1
answer
243
views
Dequeue theme stylesheets but keep widget styling on custom page template
Bit of an unusual one. I have created a plugin that will only display content on a custom page template. For this reason, I have dequeued all the theme styles via $wp_styles and loaded in the plugin ...
1
vote
2
answers
312
views
CSS not affecting widget output
so I am still quite new to wordpress development so don't rage and I am sorry if I did something really stupid.
So I am having trouble with my CSS, for some reason it's not affecting the widget ...
1
vote
0
answers
1k
views
Font Awesome 5 Free - far working but fas is not? [closed]
This is making me crazy.
I'm using Font Awesome 5 Free in custom list styles using :before and content:
In every instance, far icons are working and fas icons are not.
I've checked everything I ...
0
votes
1
answer
994
views
enqueing Javascript and CSS
Whenever I check my website on gtmetric, google Insights, Pingdom etc...
I always get feed back of render blocking JS
Currently I enqueue all my scripts as so:
<head>
<link rel="...
0
votes
1
answer
579
views
How can I get this child theme stylesheet to properly load? Or if it is correct, why doesn't my child theme appearance match the parent?
I've read the Codex article on child themes, and numerous StackExchange Q&As, but I've not been able to get this figured out. The impact is that my child theme does not exhibit the same styling as ...
11
votes
3
answers
22k
views
How to conditionally enqueue a stylesheet only for a certain page(s)?
Before I get started, I want to acknowledge that there are some really good articles that are targeted at how to conditionally enqueue scripts based on page/post content.
WordPress Plugin Development ...
0
votes
3
answers
497
views
What is the difference between the different ways of linking stylesheets
I'm only just learning WP theme development so this may be a very stupid question, but I have noticed there are different ways to link to the main stylesheet from the index.php:
<?php bloginfo('...
0
votes
3
answers
267
views
wordpress doesnt add media.css file
I recognized that site is not responsive and media.css file is not working, i inspected with dev tools what kind of styles are included in header and i found that there is min version/css/media.min....
0
votes
1
answer
645
views
Parent theme styles overriding child theme CSS [closed]
I am having some trouble getting my child theme to work perfectly. I have successfully created a child theme based on the Flexia theme. I have made child themes before but not come across this issue ...
-2
votes
2
answers
319
views
How to create my own style.css file in an wordpress child-theme
I am working in the theme called Understrap. I work in the child-theme. The theme
allready has a style.css and functions.php. I want to create my own style.css file
and overwrite that style.css ...
7
votes
3
answers
34k
views
Why is the Child Theme Stylesheet Not Loading?
I'm using the HashOne theme and created a child theme in order to make various color changes to our website.
However, the changes I've made to the child theme stylesheet are only taking place in the ...
1
vote
1
answer
2k
views
How can I move my custom css to the very bottom of the head section?
I have a code, which includes my custom css file to the of the template:
add_action('wp_enqueue_scripts', 'add_custom_css');
function add_custom_css() {
wp_enqueue_style('custom-styles', ...
0
votes
2
answers
758
views
Load custom CSS before admin CSS
I am trying to use the jQuery Datatables plugin in my WordPress dashboard but the native WordPress admin CSS styling is overiding the datatables CSS, I am calling them like this...
add_action('...
0
votes
1
answer
843
views
How do I dequeue a Stylesheet, stored in an 'Assets' folder?
How do I dequeue a CSS Stylesheet located in wp-content > themes > theme-name > assets > css > theme-skin > color.css?
The outputted code, within the Source Code, is:
<link rel='...
0
votes
1
answer
2k
views
Should I use `get_stylesheet_uri()` or `get_template_directory_uri()` when calling my CSS Stylesheet?
I am building a WordPress Theme, from the ground up. At present, I have placed a style.css file within the wp-content/themes/theme-name directory. The current information, within this file, is as ...
0
votes
1
answer
27
views
my custom css file downloads then it STOPS!
I’m watching an online course for WordPress development and at the beginning I attached the css file the exact like what the instructor did and tested it by adding some styles and it worked fine
...
0
votes
1
answer
1k
views
Child theme stylesheet not always overriding "index"
I'm using a child theme and I'm using a "styles.css" file to override things from the parent theme. My styles (there are many stylesheets) are enqueued like this:
function my_theme_enqueue_styles() {
...
0
votes
1
answer
47
views
Theme JS is available but theme CSS isn't
In functions.php I used the following code to enqueue assets, but for some reason all CSS is ignored (JS isn't ingonred):
function my_theme_enqueue_assets() {
wp_enqueue_style( 'parent-style', ...
1
vote
0
answers
133
views
Additional CSS - crashing with javascript-html minifier?
How can I load Additional CSS style manually in functions.php?
This is how I load my css files and js files:
function xxx_scripts() {
// Load our CSS bundle.
wp_enqueue_style('xxx-master-...
2
votes
2
answers
477
views
How the Css File is Linked without calling it in header.php?
everytime I analyze free wordpress.org theme, I am not able to find how the css file is linked in the theme. as far as i learned css file should be linked in header.php using link tag. but everytime I ...
0
votes
2
answers
130
views
Child Theme not loading multiple stylesheets
I have little experience with creating a Child Theme.
Just want to make some changes to css on the website.
When I use the inspect mode to see which CSS was being used, I saw it was still linking to ...
0
votes
2
answers
637
views
Proper Way to Load stylesheet on Condition
I am creating a child theme for my site and inside my functions.php I added a code to load a specific css file ONLY where it is the HOME page:
// enqueue styles for child theme
function ...
0
votes
1
answer
28
views
Including CSS files in HEAD based on page content
For example:
I have a plugin that adds a box to the page.
Box requires CSS file and JS file.
Box can be added via shortcode, or via PHP or via widget.
My question is - how to include CSS & ...
0
votes
2
answers
627
views
responsive.css in the Wordpress should be prioritized
wp_enqueue_style( 'style', THEMEROOT . '/css/style.css' );
wp_enqueue_style( 'responsive', THEMEROOT . '/css/responsive.css' );
I am using the above method to enqueue stylesheet, but what I want is ...
1
vote
1
answer
1k
views
Register and enqueue style.css custom theme
I'm trying to create a custom theme for wordpress, I created all these file:
style.css
index.php
function.php
footer.php
header.php
page.php
single.php
front-page.php
This is the code of my style....