A safe way to add/enqueue a CSS style file to the wordpress generated page. If it was first registered with wp_register_style() it can now be added using its handle.

learn more… | top users | synonyms

0
votes
1answer
84 views

Enqueue ONLY Plugin Styles and Scripts

Is there a way to enqueue only plugin styles and scripts without wp_head? I have a plugin I'm working on which overrides the page template, but I still want to include all other plugins without ...
0
votes
1answer
2k views

Deregister a CSS file that comes with a plugin

WPML plugin comes with its own CSS file. I want to get rid of all the CSS it contains, so I put everything between /* */. However I'll have to do that again when I'll update the plugin. Is there a way ...
0
votes
1answer
260 views

CSS not being applied using wp_enqueue_style

I am trying to load my style sheets in my plugin but they are not being called, the javascript files however, are being loaded. <?php /** Plugin Name: Plugin URI: Description: Version: Author: ...
0
votes
1answer
359 views

Enqueueing Scripts/Styles mid-page

Since WP 3.3, the codex has been updated for both wp_enqueue_script and wp_enqueue_style that you can now enqueue both mid-page (within the HTML body). I see this as an advantage because: It's ...
0
votes
1answer
956 views

Use conditionals with wp_enqueue_style to attach stylesheet according to post type displayed

I have many custom post types, including some introduced by plugin such as bbPress or WooCommerce. My standard stylesheet is growing large, so I thought to split it into multiple stylesheets ...
0
votes
1answer
47 views

How to offload CSS and JS files from wp-content/themes folder?

Am using the WP Offload S3 plugin and not able to offload the CSS and JS files within the themes folder. Am trying to use wp_enqueue_style() like below in wp-content/themes/spark/functions.php ...
0
votes
0answers
54 views

wp_enqueue_script and wp_enqueue_style doesn't load content over https

I have a problem with serving scripts and styles over https. Scripts included via functions.php and used proper get_stylesheet_directory_uri(), here's some code: add_action( 'wp_enqueue_scripts', '...
0
votes
2answers
27 views

Dequeue, Unregister, Remove Action - Not Working on Plugin

Several years ago, not really having a handle on the best practice for running a MultiSite network, I often network activated plugins. Later I realized this was a mistake because not all the sites ...
0
votes
1answer
26 views

How to check widget-cpt meta and display its custom css in the head?

When dealing with a widget that is a custom post type, is there a way to detect when that widget is displayed, then check its post meta for any custom css and enqueue it in the head of the site? ...
0
votes
1answer
56 views

How to dequeue / deregister parent theme style

I'm making a child theme, and I'd like to remove the Google font style that it calls for in 'fonts-style' function nada_theme_styles() { wp_register_style( 'fonts-style', '//fonts.googleapis.com/...
0
votes
1answer
145 views

Stuck with Enqueue Styles for multiple css files in a child theme

I am brand new to WP and I have been reading a ton of posts and trying out different examples out to get the wp_enueue_style to work for me but to no avail. I am using refur wp theme and I made the ...
0
votes
0answers
66 views

Tesseract-Child: Editing CSS other than Style.css

I hope some one can help me. So here is what i want to do. I have tesseract theme by Tyler Moore. I want to change the color and style of the site name that appears in the header. No potion provided ...
0
votes
0answers
24 views

Option for en-queue and de-enqueue stylesheets

I wanted to create option in the admin area on a custom page to load and unload stylesheets or scripts using a dropdown option, only 1 can be selected at a time so when one is enqueued the other ...
0
votes
1answer
222 views

Chosen Select jquery Not Working in Plugin

For some reason js and css files are not loading in my plugin. Here's what I have: (ostensibly unrelated code replaced with '...') class Location_Specific_Menu_Items { private static $instance = ...
0
votes
0answers
96 views

How to output wp_enqueue_style() in HTML head instead of footer

I added some actions to wp_enqueue_scripts to load my custom css and js files in the header section by using wp_head(); right before the closing </head> tag. function mytheme_scripts(){ // ...
0
votes
1answer
46 views

How Can I Use A Child Theme Effectively When Parent's CSS Is Located in a 'CSS folder'?

I already have a child theme and a new style.css for it, but CSS changes in my child theme's style.css don't do anything because the parent theme's different CSS stylesheets come from a "CSS" folder. ...
0
votes
3answers
75 views

Changes in enqueued / registered stylesheet paths not updating—why?

I'm attempting to modify a WordPress theme so that it appends a version number to a particular stylesheet. This is all done on a local development machine, tested on a staging server, too, for good ...
0
votes
0answers
69 views

Admin - Dequeue unnecessary scripts/styles

Currently, I'm working on a plugin where I use custom post type. In each post type edit page I've got meta data fields to set advanced functionalities. However, because the interface needs to take ...
0
votes
1answer
71 views

Customize the reset password page?

How can I style the reset password page, where I put in my new password? I tried going like this: function my_login_stylesheet() { wp_enqueue_style( 'custom-login', ...
0
votes
1answer
27 views

Should I be enqueueing styles/scripts once and then dequeueing them?

I'm new to WP dev and I want to add my own CSS/JS to an existing plugin via an extension that runs after the plugin has loaded (e.g. do_action('plugins_loaded')). This plugin did not have a payment ...
0
votes
0answers
46 views

List all non-admin enqueued files

I am using $wp_scripts and $wp_styles in my admin area to get a list of all css and js files on my site, but only admin registered styles and scripts are being added, I have googled and can't find a ...
0
votes
0answers
97 views

Why is the Dequeue Not Working For All Plugin Styles and Scripts?

I'm trying to increase the load performance a with more sensible loading of admin scripts and styles. I am dequeueing and deregistering scripts and styles where they don't need to be loaded. I've ...
0
votes
2answers
64 views

What is the proper way to include Bootstrap when executing a shortcode

I am trying to include bootstrap only when the short-code function executes. It gets included but it affects the other tags of the theme. The only way I can get around this is including bootstrap ...
0
votes
2answers
145 views

Load stylesheet on custom admin submenu page

I'm trying to load a stylesheet for a particular admin submenu page. The code below is what I came up with after looking up admin_enqueue_scripts in the codex: function my_function($hook) { if ( '...
0
votes
0answers
26 views

How to list the scripts and styles enqueued for a certain page?

How do I get all the scripts and styles used on a certain WordPress page. I would like to see the following, Name of script/style URL to script/style Version of script/style And if a certain script ...
0
votes
1answer
221 views

Enqueueing a script and a style sheet not working

I am trying to enqueue both a child theme style sheet and a child theme script. I need to enqueue the script because I put CDN links in there for Bootstrap. I know my enqueue isn't working correctly ...
0
votes
1answer
23 views

Why isn't my enqueuing working properly?

I followed this guide to try to enqueue multiple stylesheets in order to get this file picker to work in Wordpress. However, when I am getting an error that says Parse error: syntax error, unexpected '...
0
votes
0answers
89 views

Stylesheet not loading

I have started on a plugin that shows some basic information of registered users. In order to control layout I want to have a separated CSS file (in plugin-name/css/style.css). However, when I enqueue ...
0
votes
1answer
32 views

Wordpress-child problem with many css files in parent theme

Ok, So I'm trying to setup a child theme and can't manage to solve the problem with many different css files in parent theme. When I look at codex guide it's just give example on how to setup it with ...
0
votes
1answer
58 views

Enqueue CSS file for registeration form - Multisite

What is the best way to enqueue a css file for the register form for a multisite? wp_enqueue_scripts/styles works, but I would prefer it to not keep loading on the frontend all the time as it is only ...
0
votes
0answers
37 views

What's the best way to dequeue / remove uncooperative scripts and styles?

So we've got wp_dequeue_script, wp_dequeue_style as well as wp_deregister_styleand wp_dequeue_script... These work well, as long as they've been called correctly in the first place. Some plugins, ...
0
votes
1answer
46 views

Controling css order

In my plugin I need to load css file after the standard style.css. I tried to do that with the priority paramter in the enqueue command but that works only if I modify the specificity of the classes(...
0
votes
2answers
232 views

custom post with loading script per single post

I read many Q&As here on SO...(and elsewhere but they don't count...lol) I think I follow the rules of WP.org but still it does not load the scripts. Scenario: Custom template for post in Php: &...
0
votes
1answer
253 views

Use wp_enqueue_scripts, not wp_print_styles?

Everywhere is said that you need to use wp_enqueue_scripts() instead of wp_print_styles(). wp_print_styles() is located in wp-includes/functions.wp-styles.php. So what does it mean? What should I ...
0
votes
1answer
105 views

font style is not working on domain

I have two domains, one http://www.eu-ohne-mpu-fs.de/, second: http://eu-bw.de/. Second domain is the one where Wordpress Adress(URL) and Domain Adress(URL) is set. First one is pointing to the ...
0
votes
1answer
60 views

Modify arguments for parent theme's `wp_register_style` via child theme

Working on a child theme for site with a good deal of separate stylesheets being registered/enqueued from the theme and plugins. I'd like to change some attributes of the <link> tags in the ...
0
votes
0answers
176 views

How to enqueue both style.css and style-mobile.css in child theme

This is pretty basic, but I'm not sure what I'm doing. I have setup a child theme and I'm able to edit my child theme style.css and make changes successfully. However I'm unable to enqueue the style-...
0
votes
2answers
59 views

wp_enqueue_script stopped working

I'm facing a strange problem. After I've moved to another server, my wp_enqueue_script calls don't do anything. I do have this function: function moemax_scripts() { wp_enqueue_style( 'bootstrap-...
0
votes
0answers
19 views

Most optimal way of starting fresh, without using other theme or dropping old files?

I have an unusual situation: A website with very trashed styles.css (thousands of lines of trashy code), around 70+ custom templates, tons of js libraries loaded. First reaction was, lets start fresh ...
0
votes
1answer
131 views

Best way to enqueue CSS and JS in a specific location

I'm putting CSS and javascript files in a created directory inside a created directory inside wp-content and my enqueue code is going in an mu-plugin. Due to how I have set-up my wordpress multisite ...
0
votes
0answers
66 views

How can I properly enqueue tags <link> in WordPress to use with Web Components?

The Chrome browser supports Web Components and I would like to add a number of them in WordpPress pages, but using the queuing mechanism as in the case of the functions wp_enqueue_script and ...
0
votes
1answer
222 views

Why won't my Custom CSS Load

I'm in the process of adding a jQuery plugin to a site I'm working on. Needless to say it requires loading a custom script; also a custom stylesheet. Starting with the stylesheet I've been ...
0
votes
1answer
360 views

custom template - override plugin template in child theme - issue with scripts

I'm using a custom template for the single-listing.php from WP Listings. I've used my own theme (Canvas by woothemes) single post template, and included the wp-listings code. http://pastebin.com/...
0
votes
0answers
115 views

How add style in wp after main theme style.css

I try add style via plugin which should overwrite main theme style.css I use this code but it is not help me. function css() { wp_enqueue_style( 'css', plugins_url( '/css/style.css', __FILE__ ),...
0
votes
0answers
93 views

Enqueue custom jQuery UI theme to override Google CDN theme

I'm trying to override the jQuery UI theme that wordpress enqueued from Google CDN link but I have not found a solution to my issue. I have my stylesheet enqueued correctly in my plugin but the styles ...
0
votes
0answers
135 views

Why are my parent styles loading after my child styles?

I am trying to build a child theme that uses SCSS. However, every time I make changes and recompile my stylesheet, it gets overridden by the parent stylesheet. This is because, in the head of my site, ...
0
votes
1answer
62 views

Different styles on multiple pages

I'm using _s to build a theme. I want to have different styles for different pages. I can figure out how to get two pages working but I want different styles for 5 pages? Maybe an else if statement? I ...
0
votes
1answer
463 views

Unable to load stylesheet via wp_enqueue_style

I am using this <?php// Load the theme stylesheets function theme_styles() { // Load all of the styles that need to appear on all pages wp_enqueue_style( 'main_css', ...
0
votes
1answer
144 views

How to add php stylesheet to admin section instead of admin_head hook

how can we do the below code using separate file let say admin-style.php add_action('admin_head', 'custom_admin_style'); function custom_admin_style() { $bg_color = get_option('custom_color'); ...
0
votes
1answer
66 views

Print all inline styles to head

Currently working on a project here http://palanquin.shrimp-works.com. When I try to validate what I have done so far, using http://validator.w3.org/, I get lots of this error Element style not ...