The wp-enqueue-style tag has no wiki summary.
0
votes
1answer
33 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
23 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 ...
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
129 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 ...
1
vote
1answer
59 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
160 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
54 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 ...
1
vote
0answers
121 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
52 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 ...
1
vote
1answer
556 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 ...
2
votes
1answer
197 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.
0
votes
1answer
49 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
64 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
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
94 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
93 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
270 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 ...
0
votes
1answer
133 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 ...
13
votes
2answers
269 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: ...
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
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 ...
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
420 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
195 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 ...
3
votes
2answers
508 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 );
...
5
votes
2answers
1k 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', ...
2
votes
1answer
885 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( ...
0
votes
1answer
379 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 ...
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 ...
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 ...
-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
127 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 ...
0
votes
2answers
813 views
wp enqueue style on specific page templates
I am in the process of a theme, I would like to add landing pages using page-templates. I cannot find anywhere that shows how to enqueue style or js for specific page templates. Any suggestions.
Ex. ...
0
votes
1answer
274 views
Enqueue styles after a plugin
Is there a way to enqueue my style.css (and other stylesheets) AFTER a certain plugin enqueues its styles?
Specifically, I want my style.css to overwrite cforms's styles, but when I change the ...
0
votes
1answer
55 views
admin_print_styles incuding $_SERVER['DOCUMENT_ROOT']
All the Javascript isn't working in the admin area on my production server.
Locally it works fine. I have narrowed it down to /wp-admin/wp-header.php line 72-78
do_action('admin_print_styles');
...
2
votes
1answer
67 views
Hyphens vs. periods in the script slug in wp_register_script?
I have seen script and style handles written in two different ways in wp_register_script and wp_enqueue_script (the same applies to wp_register_style and wp_enqueue_style):
wp_register_script( ...
1
vote
3answers
605 views
How do I force wp_enqueue_scripts to load at the END of <head>?
I am loading scripts via wp_enqueue_scripts in my child theme.
The only problem is that my style.css script get loaded BEFORE plugin scripts, yet I need to override the css in the plugins with my ...
0
votes
1answer
205 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:
...
2
votes
3answers
143 views
Is it possible to enqueue a raw CSS string directly from within a template file?
I was wondering if it's possible to enqueue raw CSS as a string directly from within a template file?
I'm writing a custom template for a page and need to add some style rules for it. What I want to ...
2
votes
1answer
152 views
TinyMCE custom stylesheets for different post types
I use a custom stylesheet for TinyMCE, by placing custom styles in editor-style.css in my theme's directory.
I am trying to figure out how to use a different stylesheet depending on what post type we ...