Tagged Questions
4
votes
1answer
123 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
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
2answers
51 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 ...
2
votes
1answer
194 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
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() . ...
1
vote
1answer
262 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
1answer
130 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
267 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: ...
0
votes
2answers
51 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
401 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.
...
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', ...
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
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
141 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 ...
1
vote
1answer
641 views
How do I make header.php use different css for different pages?
I register styles in function.php with
function my_scripts() {
wp_deregister_style( 'header' );
wp_register_style( 'header', get_template_directory_uri() . '/css/header.css' );
...
1
vote
2answers
690 views
Wordpress admin stylesheet
Is there a way to override the styles in the admin in my theme?
I don't want to touch the admin style sheet if I don't have to.
I just want to make a column bigger in my admin, but also, to do it in ...
1
vote
2answers
1k 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 ...
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
1answer
559 views
wp_enqueue_style with style.php and Wordpress functions
I use wp_enqueue_style to add my stylesheet, like this:
<?php wp_enqueue_style( 'theme-style', get_template_directory_uri() . '/style.php', false, '1.0', 'all' ); ?>
It works fine BUT I need ...
0
votes
1answer
387 views
wp_enqueue_style in Plugin [duplicate]
Possible Duplicate:
Where is the right place to register/enqueue scripts & styles
When I enqueue a css style in a plugin like so:
function add_my_stylesheet()
{
wp_enqueue_style( ...
1
vote
1answer
399 views
Loading different stylesheet on Wordpress pages?
I have one stylesheet linked to my Wordpress page in header section:
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/style.css" />
Now, I want to ...