The wp-enqueue-style tag has no wiki summary.
1
vote
3answers
22 views
Enqueue stylesheets with the same name
Ok, maybe i'm thinking too difficult, but I have 2 stylesheets with the same name. One is from the parent theme folder, and one from the child theme folder.
I want to enqueue the style from the child ...
0
votes
1answer
108 views
plugin's script and style enqueing not working on Thesis
I've published a plugin on WP repository that allows some theming for Gravity Forms.
This plugin as been tested with Twenty Ten, and Twenty Eleven.
When I've tried to test it in a site that uses ...
1
vote
1answer
574 views
How to enqueue the style using wp_enqueue_style()
I'm developing a theme. I added the codes (below) into the header.php. But I posted it into the WP theme repository, and it's under review, and the reviewer informed me to enqueue the style with ...
3
votes
4answers
1k views
Enqueue Google Web Fonts Without Messing Up Symbols In URL
Enqueuing Google Web Fonts the usual way, i.e., using the wp_enqueue_style function like so...
function wpse_google_webfonts() {
wp_enqueue_style( 'google-webfonts', ...
0
votes
1answer
34 views
Why enqueue styles on hook
Why do we need to enqueue styles on a hook, why not just enqueue them straight in like this?
wp_enqueue_style( $handle, $src);
the codex page gives an example of using a hook but doesn't explain ...
0
votes
1answer
24 views
Removing an action, or dequeueing style - Both not working
What I am wanting to achieve is to remove an action called inside of another action.
The action is calling a style, and although I have tried to deregister, and dequeue the style, it is still ...
4
votes
3answers
876 views
LESS CSS enqueue_style with add_filter to change rel attribute
What I'm trying to do is use less css with Wordpress.
You're supposed to link to your .less files with the rel attribute set to 'stylesheet/less'. But I can't figure out how to alter the code that ...
0
votes
1answer
136 views
Override theme style with other CSS on a specific page
The wordpress theme I bought has some jQuery UI styling included in its default CSS file. The problem is I have a plugin that uses jQuery UI and the theme's default CSS makes the plugin corrupted. I ...
1
vote
1answer
47 views
How can I let templates choose which stylesheets are enqueued?
My theme's functions.php hooks into wp_enqueue_scripts to register a couple of stylesheets that are used by various site pages. Here's a simplified version of my configuration:
...
4
votes
1answer
138 views
How to enqueue style before style.css
How do I enqueue a .css file before style.css is loaded? Or make the default style.css dependant on another .css file?
I'm trying to load a .css reset, which style.css would overwrite.
Here's what I ...
0
votes
2answers
33 views
wp_enqueue_scripts hangs
In the following snippet, when I add the wp_enqueue_scripts call, the page freezes.
What am I doing wrong?
function my_enqueue_stuff() {
if ( is_front_page() ) {
wp_enqueue_style('style', ...
0
votes
0answers
27 views
How to load script-related styles automatically?
Scenario: It is common that a JS dependency is bundled with a style file to work properly (just think about your favorite slideshow jQuery plugin). AFAIK, in this situation, the script and style have ...
0
votes
0answers
11 views
get_stylesheet_uri() seems to be returning the wrong path. Where is this coming from? [duplicate]
I've got Wordpress 3.5.1 setup like Mark Jaquith's Wordpress Skeleton repository. (https://github.com/markjaquith/WordPress-Skeleton). I'm using Roots as the theme, but the stylesheet directory is ...
2
votes
1answer
202 views
How to combine multiple CSS files and concatenate JavaScripts if WordPress recommends enqueuing them?
How would I go about combining multiple CSS files and concatenating my scripts if they're being enqueued as WordPress recommends? My site is pretty slow and would like to optimize for performance.
1
vote
1answer
61 views
wp_enqueue_style will not let me enforce screen only
I am using Roots as the starter for a theme I have been working on. I then generated a print.css file, but in Chrome's case, it still is using the bootstrap-responsive.css queries, and messing things ...
0
votes
0answers
43 views
wp_register_script stops wp_enqueue_style working
Ambiguous title, yes. Sorry.
I am using the roots framework to register scripts and stylesheets.
When I include the wp_enqueue_script('main_js'); my style sheets come out as <style media="" ...
0
votes
1answer
167 views
get_stylesheet_uri returns wrong path
I am using the roots theme. Inside scripts.php, the stylesheets are loaded using the wp_enqueue_style-function.
wp_enqueue_style('roots_bootstrap', get_template_directory_uri() . ...
0
votes
0answers
57 views
Starkers Theme and Conditional Comments for IE
I apologise if this is a double up, I am in way over my head and understanding which is probably why I can't find/understand the answer to this. I apologise if I'm doubling up on an existing question ...
5
votes
2answers
2k views
Remove Open Sans from Twenty Twelve theme
I´m creating a child theme for Twenty Twelve v1.0 and I want to remove the Open Sans font.
Open Sans is added in Twenty Twelve´s functions.php:
wp_enqueue_style( 'twentytwelve-fonts', ...
1
vote
0answers
122 views
wp_enqueue_script Doesn't Work?
It's pretty standard, I enqueue script and style for admin page.
function admin_custom(){
wp_enqueue_script('js', plugins_url('adm.js', __FILE__));
wp_enqueue_style('css', ...
0
votes
2answers
53 views
Display Something in the Header After All Styles are Loaded
I'd like to include a functionality in a theme that will overwrite styles from previously included CSS files. For this purpose, I need to be able to display a <style> in the header after ALL ...
0
votes
1answer
50 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 ...
-1
votes
2answers
65 views
Trying to get styles to register than enque
I have the following code in my functions.php file with a call in the header, but nothing is being outputted in the html. There are no stylesheets.
I have tried that add action wp_enque_styles with ...
1
vote
3answers
1k 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 ...
1
vote
2answers
58 views
Why are my styles being applied to the admin area?
All my enqueued styles are applied to the back-end as well. I have never encountered this behavior before.
Here's my code:
wp_register_style( 'main-styles', get_stylesheet_directory_uri() . ...
0
votes
1answer
96 views
Register script/style: Is it possible to customize the version query string via plugin?
Expanding on the question in the title:
I would like to find a way (via a plugin) to use timestamps for the JS and CSS file version query strings that are output with wp_register_style and ...
1
vote
0answers
40 views
Need help enqueueing webfonts
I am attempting to enqueue web fonts that I am loading in via the WebINK font library. (This service is similar to Typekit). This service works by generating a unique CSS link for each unique site. I ...
0
votes
2answers
94 views
Is the wp_enqueue method efficient?
I had a quick question regarding how you are supposed to load in scripts with Wordpress. I am developing a theme and I know that the best way to do this is to use the ...
1
vote
1answer
272 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 ...
0
votes
2answers
57 views
All of my Scripts and Enques are getting file not found
I have the following script and enque function, and the site properly renders it in the html head, however when I click the link to the css and javascript files the i get a url not found, however the ...
13
votes
2answers
271 views
Is it ever okay to include inline CSS in plugins?
Normally in a plugin I would add styles using wp_enqueue_style. However, I am currently creating a plugin that only needs a few lines of CSS and I am wondering if it might be better to serve the ...
1
vote
1answer
97 views
Fixed layout for admin section
I would like to customize the layout of the admin section of WordPress.
The thing is, whatever the layout I create, I'm very dependent of the default "fluid" layout of the admin. By fluid, I mean: ...
1
vote
2answers
184 views
Enqueued scripts and styles loading in WordPress Dashboard as well
For a moment, I wondered if my test site got hacked -- my WordPress site's dashboard was all broken (cosmetically). But when i looked at the source code of the page, I noticed that the "scripts and ...
1
vote
1answer
163 views
Whats the proper way to use a php stylesheet in a wordpress theme? [duplicate]
Possible Duplicate:
How can I use WordPress functions in my stylesheet?
I have a file, custom.php, thats basically a stylesheet with php variables for the styles. I used this guide to make ...
14
votes
5answers
4k views
Conditionally Loading JavaScript/CSS for Shortcodes
I released a plugin that creates a shortcode and requires a JavaScript file and a CSS file to load on any page that contains that shortcode. I could just make the script/style load on all pages, but ...
11
votes
4answers
3k views
How do I enqueue styles/scripts on certain /wp-admin pages?
I have two simple functions that load stuff using wp_enqueue_style() and wp_enqueue_script(), something like these:
function admin_custom_css()
{ wp_enqueue_style( 'stylesheet_name', ...
3
votes
2answers
3k views
Notice that the wp_enqueue_style is not being called correctly!
I get this error due to one of the plugins which I rely on.
Notice: wp_enqueue_style was called incorrectly. Scripts and styles
should not be registered or enqueued until the wp_enqueue_scripts,
...
0
votes
2answers
54 views
How do I use a color from theme options?
I am building a theme, and in the options I have created a place for link color. I cant seem to get this into the theme in any reasonable way. The best I can do is to put it after wp_head ... but that ...
0
votes
1answer
425 views
Custom Admin CSS styles to style media uploader?
Hopefully a simple answer to this. Using the wp custom header feature, the media upload screen shows an extra field: "set as header". I'm trying to make this text bigger as it can easily be missed.
...
0
votes
1answer
199 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 ...
2
votes
1answer
893 views
How do I dequeue a parent theme css file?
My parent theme (Starkers) adds a CSS file that I'm trying to remove (I want to use @import instead so I can override styles more easily). Starkers has the following in its functions.php:
add_action( ...
3
votes
2answers
514 views
How Would You Enqueue A Google Web Font?
I'm using the Rosario font from the Google Web Fonts in my theme and I want to enqueue the font so that if there was ever a plugin that used a fancy font that there wouldn't be any conflicts or wasted ...
0
votes
1answer
139 views
How to use wp_enqueue_script, style when required
There are lot of unused js & stylesheets in my theme.
here is wp_register function in my functions.php
wp_register_script( 'moder', base_url . 'js/modtom.js', array(), false, false );
...
0
votes
0answers
72 views
Child-theme, deactivate function from parent [duplicate]
Possible Duplicate:
How do I dequeue a parent theme css file?
I'm working on a child-theme from Starkers.
However, I can not disable wp_enqueue_script(), because I do not want to use the ...
0
votes
1answer
389 views
Remove a script from a template file using wp_dequeue_script
I thought I had read it was possible to use wp_enqueue_script() and wp_dequeue_script() directly in individual template files. However, when I add
wp_dequeue_script( 'myscript' );
to the top of ...
-1
votes
1answer
117 views
Background of default template showing instead of the background of custom page template
Plugins were not working for my custom page template, found out that I needed to put WP_head() and WP_footer(), so did that and the plugins started to work. But now the background changed to that of ...
0
votes
3answers
290 views
What can I hook into after_setup_theme?
I'm wondering what can I or should I NOT hook to after_setup_theme? I'm wondering because I have been told that I shouldn't hook wp_enqueue_style to it, but I have seen other places using it to hook ...
0
votes
1answer
129 views
Having issue with WordPress wp_enqueue_style
I am building a full design into WordPress for the first time and I am trying to load in stylesheets and script files but all I seem to be getting is the text output of the location.
What I have is ...
0
votes
0answers
13 views
How do I properly add CSS stylesheets to my theme? [duplicate]
Possible Duplicate:
Where is the right place to register/enqueue scripts & styles
What's the recommended way to include CSS stylesheets into my theme?
Is it best to enqueue CSS ...
18
votes
1answer
3k views
Where is the right place to register/enqueue scripts & styles
I am using WordPress 3.1.4 by now. I am confused with where (which hook) do I use:
to register and/or enqueue
scripts and styles
on front- and back-ends?
Questions:
Which are right hooks to ...
