A web style sheet is a form of separation of presentation and content for web design in which the markup (i.e., HTML or XHTML) of a webpage contains the page's semantic content and structure, but does not define its visual layout (style). Instead, the style is defined in an external style sheet file ...

learn more… | top users | synonyms

13
votes
3answers
2k views

How important is it to enqueue a theme's stylesheet?

I have trawled the net looking for an answer to this, but for some reason all I can find are actual examples, but without that particular explanation, which is clear say in the case of scripts. Can ...
7
votes
4answers
256 views

Do I actually need to link my theme's style.css in the theme files

So I am developing a wordpress theme using a series of LESS files for the CSS. These compile using codekit to a combined and minifed stylesheet that I use for the theme's styling. I understand a ...
6
votes
2answers
521 views

Style reply form different than comment form

Is there a way to display (css and html) in a different way the "reply" form and the main "comment" form?
5
votes
4answers
3k 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', ...
5
votes
8answers
7k views

How can I version the main CSS file?

How can I instruct wordpress to use a filename other than 'styles.css' for my main stylesheet - for example, styles-1.css? I'd like to do this for versioning and caching purposes.
5
votes
2answers
4k views

Generating CSS Files Dynamically Using PHP Scripts?

As part of my efforts to speed up my themes for my clients I am delivering my CSS via a dynamic PHP file. At the end of the called for example my_theme_css.php: This allows me to add Expiry headers ...
5
votes
1answer
207 views

How to work with custom styles saved in theme option?

I am creating a theme where user can save custom styles from theme customizer through settings API. Those style info are saved in options table as serialized data. When Custom skin is active I will ...
4
votes
1answer
3k 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 ...
4
votes
3answers
512 views

How can I reduce the amount of files loaded/included per plugin?

I have a Wordpress site that uses several plugins, namely 8. Most of these plugins include a lot of their own JS and CSS files, some even include so much as 3 separate CSS files. One can imagine that ...
4
votes
1answer
497 views

Is it possible to bold certain words in a post title?

I guess I would like to be able to include HTML tags within the title so that when the title is listed certain words are bolded. Is this possible? When I try to put HTML into the title, the tag ...
3
votes
3answers
374 views

Stylesheet switching and caching

I'm implementing a site that allows users to switch stylesheets (to show a high contrast version for people with vision impairments). The switcher essentially just changes the <link>ref to ...
3
votes
1answer
119 views

Enqueue Stylesheets After Theme's “rtl.css”

I am currently developing a theme with internationalization support, and would like to load stylesheets after my theme's rtl.css (an alternative style.css loaded for languages with a right-to-left ...
3
votes
2answers
769 views

How to add stylesheets only to pages with specific shortcode?

I'm running a function on pages where the shortcode [make-me-a-map] is used. It enqueues javascript to the page and makes a map. That part works fine (woot!) but I'm having trouble with adding the ...
3
votes
1answer
225 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 ...
3
votes
1answer
107 views

How to modify/extend/override a core method?

This is my first post. In advance, thank you for welcoming me... Context When you enqueue style, you can output your css link into conditional comments. global $wp_styles; ...
2
votes
2answers
1k views

When enqueing a stylesheet, is it possible to remove the type attribute?

I'm updating my self-built theme to HTML5, and easily made a number of changes already. My theme's sole stylesheet is added to the page head via wp_enqueue_style in the functions.php file, as ...
2
votes
2answers
3k views

wp_enqueue_style built in styles

I'm writing (rewriting) my plugin to use wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-dialog'); Which is great! But to use the dialog I need to load a jquery style sheet with ...
2
votes
1answer
59 views

Overwrite CSS with without deleting it

I have some css in the theme that I am using, I want to keep the stock style.css without deleting any of it. I want to use my child-theme style.css to remove or hide some values of a class. I would ...
2
votes
2answers
970 views

How to implement different color schemes in your themes

This question is for theme developers. I know how to use the settings API to gather input data, but I was wondering what's the best way include the styles. Let's say you have 4-5 versions of the ...
2
votes
2answers
781 views

add generated stylesheet from parent theme after child-themes style.css

I have a child-theme -> parent-theme setup, where I need to have stylesheet called generated.css loaded in addition to the style.css file added by the active child-theme. The generated.css file is ...
2
votes
1answer
34 views

WordPress – site with 2 stylesheets and more…

I’m building a site that is broken up into two views (or sections): College and Corporate. » See it here When the College tab is active, the site will use college-styles.css (orange background) ...
2
votes
2answers
1k views

how to make stylesheet appear in theme editor?

I have a stylesheet in my theme in the css subdir of the theme dir (css/style.css). The question is how to make this .css file appear in the theme editor of the WordPress admin. (I know using the web ...
2
votes
1answer
98 views

Theme information in style.css being corrupted

I am customising someone else's theme to allow the website owner to edit more regions than she could previously. I copied the theme into a new folder, with a different folder name to the original. I ...
1
vote
4answers
272 views

Different background-image by category

I am trying to put different body background-image for each category. body { background-color: #000; background-image: url(img/bg.png); background-repeat: no-repeat; background-position: center ...
1
vote
3answers
5k views

how do I queue my Child stylesheet/s *after* every Parent stylesheet/statement?

I'm using the well-written Oenology theme by Chip Bennett as the Parent to my own Child theme. In my development process, I've discovered that there are some challenges for people writing Child ...
1
vote
2answers
463 views

Do I have to use a Wordpress specific CSS reset, or is a normal, Eric Meyer style CSS reset fine?

The great starter theme _S for Wordpress has the following CSS reset included, which works pretty well I find: https://gist.github.com/4173728 But I prefer the Eric Meyer one, which I'm sure you're ...
1
vote
1answer
2k views

Changing permalink changes stylesheet path?

I have changed my permalink structure to /%category%/%postname%/.The links are working, but the problem is that my style.css is not working in some of the posts which are inside the category.
1
vote
3answers
153 views

To enqueue or not to enqueue

What is the best way to link to a CSS file in WordPress? Method 1: Use the following whenever needed <link href="<?php echo get_template_directory_uri(); ?>/my-style.css" rel="stylesheet" ...
1
vote
2answers
245 views

getting url in wp_enqueue_style

I'm having trouble getting the second argument in wp_enque_style. Here's how my site is setup: style.css custom_style.css index.php In a template, I have this code: $stylesheet_url = ...
1
vote
3answers
2k views

Can't edit style.css in subdirectory of my theme?

I want to edit a file style.css but the theme editor shows this: /* ---------- Reset Tags ----------- */ @import url("css/reset.css"); /* ---------- Reset Tags ----------- */ @import ...
1
vote
2answers
5k views

Specific css on homepage, different one for other pages

Is there a way to have specific css on the homepage and use a different one for all the other pages?
1
vote
2answers
638 views

What parameter should I pass to wp_enqueue_style to depend on the themes stylesheet?

I have written a basic gallery plugin that uses wp_enqueue_style to include a stylesheet on the page. I'd like for the WordPress theme to be able to override the style of the plugin which means I'd ...
1
vote
1answer
3k views

adding custom stylesheet to wp-admin

im having troubles getting my custom stylesheet work on WP-ADMIN area. plugins_url('style.css', __FILE__) ); do i have to create folder in my plugins named css or do i just copy my .css to the ...
1
vote
1answer
89 views

Add a custom stylesheet for BlackBerry

I want a little help loading a custom stylesheet in wordpress. I'm using PHP to check if the user agent is BlackBerry. If yes, I want to load blackberry.css, if no, regular wordpress style.css. ...
1
vote
2answers
135 views

Hiding styles from Facebook

Some of my pages/posts have very short custom stylesheets at the beginning of them. I know this isn't great practice, but it's worked very well thus far. The problem, however, is linking on Facebook: ...
1
vote
2answers
317 views

Child Theme vs. Jetpack Editor

I have read that it is always desirable to create a "child theme" so that any changes I make don't get washed away if the main theme is updated. However, one of Jetpack's features is a CSS editor ...
1
vote
1answer
235 views

Changing stylesheet depending on custom taxonomy terms

My client would like the background & header colors to switch depending on terms within the custom taxonomy 'Grades'. These terms are kindergarten, first grade, second grade, etc... (all ...
1
vote
1answer
597 views

Wordpress override bloginfo variable

How would I override a bloginfo variable in wordpress? For example, I want to replace this: <?php bloginfo('stylesheet_directory'); ?> to return a custom URL like http://mysites.com/hello/
1
vote
1answer
81 views

Dynamic Stylesheet loads but doesn't finish

I am creating a website for an architect with large images being a main feature of the site. Given the potential size of the images I wanted to have a way to create responsive image sizing (and of ...
1
vote
2answers
238 views

Avoid to load default WP styles in login screen

Is there some way to avoid the load of default WordPress styles in login screen to only load my custom stylesheets? Actually I'm using this code: function login_styles() { // Sets the styles if ...
1
vote
1answer
164 views

Add CSS to head depending on nav menu walker

I have a custom walker for a navigation menu on my website, and within it I have some custom CSS that I want to apply to each menu, however, I cannot simply echo it there because even though it works ...
1
vote
1answer
824 views

W3 Total cache “empty all caches” and no stylesheets render

I have the w3 Total cache plugin installed and so far its been great as I'm sure you will all agree, so thanks to the author for an amazing plugin. However, I used the "empty all caches" button on the ...
1
vote
1answer
426 views

Deregister default wp-admin css on login screen only?

I have a question about deregistering 'wp-admin' styles specifically on the login screen. If I just globally run: <?php wp_deregister_style( 'wp-admin' ); ?> my login screen will have no ...
1
vote
1answer
928 views

How do I register a stylesheet inside a WordPress widget?

I'm developing a WordPress widget following Dave Clements tutorial. It works well. Now I want to add some styles to it. I want the styles to be in an extra css file which will be loaded during ...
1
vote
1answer
305 views

Admin Panel pagination link styles

Whenever I write plugins that use Admin Panels, I include some form of pagination using the paginate_links method and I have always been able to style them in a nice way using the suggestions on this ...
1
vote
1answer
450 views

How to override my plugin's php classes with duplicates that are in my child theme folder

I have a child theme in wordpress and one of the plugins I am using is called jigoshop. I made a copy of a few php classes from the plugin and placed them in my child theme folder. I want these ...
1
vote
1answer
197 views

How to load parent theme style.css?

My WordPress site uses a theme that is a child of a parent theme. As required, both themes have style.css files. However, as far as I can tell WordPress only provides the mechanism to load the child ...
1
vote
1answer
684 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 ...
1
vote
1answer
82 views

Remove Wordpress Scripts

I am working on a custom page template in my theme, i want to remove all other styles and scripts which are loaded, like default theme style, jquery & other scripts, i want to remove all for the ...
1
vote
1answer
559 views

Dynamically add CSS to the visual editor

I created an options page for my theme, where I can manually edit the CSS. Lets say I change the CSS in the options page for the <H1> tag, so it will now change it on the front-end. What I want ...