Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
Simon's user avatar
  • 1
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 ...
scopeak's user avatar
  • 213
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 ...
user avatar
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 ...
Dev john's user avatar
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="...
Paulmcf1987's user avatar
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 ...
tim.rohrer's user avatar
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('...
AffectionateOrange's user avatar
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 ...
Ragnhild J.'s user avatar
-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 ...
Dev_John's user avatar
3 votes
3 answers
3k views

Relative path instead of absolute for wp_enqueue_script

When you enqueue scripts or styles with the following: function themeslug_enqueue_style() { wp_enqueue_style( 'core', '/style.css', false ); } add_action( 'wp_enqueue_scripts', '...
Troy Templeman's user avatar
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', ...
paulfcdd's user avatar
0 votes
2 answers
2k views

I can't add CSS with functions.php

I'm relatively new to creating a theme with WordPress, and I've been adding all the stylesheets (main and for each page) with the old echo get_stylesheet_uri();. But I find out that this isn't the ...
Bruno Marini's user avatar
0 votes
1 answer
668 views

style.css of my custom theme is not being applied at all

I am creating my own theme Wordpress, however the CSS I wrote for the theme design is not being applied at all. It's saved in style.css and I have applied the following in my functions.php file: ...
Rowan's user avatar
  • 1
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()); ...
DVDSON's user avatar
  • 23
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('...
fightstarr20's user avatar
  • 1,135
4 votes
2 answers
11k views

How can I dequeue a Plugin Stylesheet?

I am currently using a Plugin, which has created a Stylesheet within the following directory: /wp-content/uploads/plugin-name/css. I would like to remove this Plugin's Stylesheet, since it is being ...
Craig's user avatar
  • 358
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='...
Craig's user avatar
  • 358
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 ...
Craig's user avatar
  • 358
1 vote
1 answer
2k views

How to insert html/css/javascript code to wordpress plugin

I'm trying to show a modal dialog when user get registered (action_hook: user_register) using the woocommerce plugin, but without having any result. I would appreciate any help! The code is shown ...
fmp's user avatar
  • 11
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 ...
omar's user avatar
  • 1
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() { ...
Sergi's user avatar
  • 260
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', ...
Arcticooling's user avatar
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-...
Run's user avatar
  • 331
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 ...
TheDose's user avatar
  • 198
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 ...
Stefka Waaijer's user avatar
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 ...
Agustin's user avatar
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 & ...
Marvin3's user avatar
  • 663
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 ...
WordCent's user avatar
  • 1,877
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....
Crashy's user avatar
  • 199
0 votes
1 answer
440 views

Wordpress Child theme fails to override parent theme css

I've installed the Faxhion theme for a client, and I've successfully created a child theme. However I'm somehow not able to override the parent themes css. Similar questions such as this one & ...
JordanMiguel's user avatar
0 votes
1 answer
317 views

How to properly add my styles overriding current styles

I have a WP website: after reading docs everywhere, I made up a little, personal plugin that lets me display a particular app, made with VueJS, into a single Page. Now, the theme of this website is a ...
3000's user avatar
  • 185
2 votes
1 answer
298 views

wp_enqueue_style specifics for overwriting plugin styles

I'm trying to add some custom CSS to dictate a very small part of a plugin's look. I don't want to dequeue the whole think (I don't think) as I'm happy with the rest of it. I found this answer here ...
rickibarnes's user avatar
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....
Andrew's user avatar
  • 135
0 votes
2 answers
2k views

Custom admin bar css on front end bug

I want to apply my valid custom admin bar color scheme to front-end toolbar. I am using this code to do it: add_action( 'wp_enqueue_scripts', function () { wp_enqueue_style( 'color-admin-...
CMTV's user avatar
  • 125
2 votes
3 answers
1k views

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

So, I'm totally new to WordPress and trying to "convert" a static site to a WP theme. I have a page where I'd like to use the featured image as a background for a div. I was wondering what is the ...
lastnoob's user avatar
  • 153
1 vote
4 answers
5k views

Adding external stylesheet after ALL other styles

The theme I'm using makes extensive use of internal stylesheets to style various types of pages and their elements. For example, through their plugin UI, I can configure a specific page's hero layout ...
Daveh0's user avatar
  • 191
0 votes
1 answer
1k views

stylesheet in header or functions?

So I have an interesting dilemma here. My understanding is that best practice is to load up stylesheet, including Bootstrap css and javascript via functions.php file. However, in the header.php file ...
Daniel's user avatar
  • 351
2 votes
1 answer
2k views

Enqueued Stylesheet Version Number Not Being Appended

I have an issue with the child theme stylesheet being browser cached, and I need to dequeue/reregister, then re-enqueue with a timestamp for the version number. The dequeue then re-enqueue is working ...
AndyWarren's user avatar
0 votes
1 answer
2k views

Child Theme CSS not showing at all

I have a child theme that is not showing my CSS changes at all. When I inspect element, the changes don't show in the explorer window. I look in the head and the child theme style is not enqueuing. ...
Heather's user avatar
  • 489
1 vote
1 answer
201 views

Enqueue Style Only On Certain Pages Not Working

I am trying to enqueue Bootstrap's CSS only on two pages. Here's the code I have in my functions.php file: function bootstrap_css() { if (is_page('who-we-are-2') || is_front_page()) { ...
Nick Taylor's user avatar
0 votes
1 answer
787 views

How would one set or override a Fallback font for characters in second language?

In my website, posts occasionally contain characters from a second language (Urdu), which the google web-font set by my theme, of course does not recognize and resorts to a fallback font. I was ...
Samwyzz's user avatar
  • 21
3 votes
3 answers
5k views

How to add the main style.css to my index.php?

I'm creating for the first time a theme from scratch. It's not a child theme In theme's function.php file I'm doing add_action( 'wp_enqueue_scripts', function() { wp_enqueue_style( 'style', ...
realtebo's user avatar
  • 267
1 vote
1 answer
100 views

Plugin CSS not enqueing

My apologies if there is an answer to this already making this a duplicate question, I have spend the last 3 days trying to get the CSS styling to be applied in a way that WordPress would allow, it is ...
Development SideShow Media's user avatar
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 ...
DisgruntledGoat's user avatar
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 ...
Sakena's user avatar
  • 73
1 vote
1 answer
406 views

How remove render blocking css from wordpress when you build a theme?

Is there any good way to avoid render blocking css (google page speed) from Wordpress. Probably more complex, but find a way to add in theme development. It means, not something very specific but ...
user3415011's user avatar
0 votes
2 answers
63 views

One Site. One Theme. Multiple Stylesheets without plugins?

Greeting Community, Here’s my challenge: We have an annual report that is published annually. We do NOT want to spin up a new site and domain each year, but house each previous year’s edition on the ...
Joe A Simpson Jr's user avatar
0 votes
1 answer
159 views

First element/selector of enqueued CSS file breaks

I have successfully enqueued a CSS file using wp_enqueue_style. I have verified that the CSS I am using for all my settings and selectors is correct. Indeed, all styling is applied except for the ...
CoderScissorhands's user avatar
2 votes
2 answers
3k views

Style.css in child theme is loaded before Bootstrap

When I enqueue Bootstrap with wp_enqueue_style(), Bootstrap is loaded after the child theme's style.css and will override style.css. One way to load style.css after Bootstrap is to enqueue style.css ...
newjonnydepony's user avatar
0 votes
1 answer
3k views

get_template_directory_uri() links to child theme not parent

I have created a child theme of a parent theme which shows correctly on wp theme selector and activates. I have created a style.css of said child theme with the following meta information: /* Theme ...
WeebleWobb's user avatar