The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
16 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 ...
2
votes
1answer
99 views

Enqueue Scripts / Styles when shortcode is present

What is the idea way to register/enqueue scripts and/or styles for use in plugins? I recently made a plugin simple plugin to add the user avatar/gravatar with a shortcode. I have different style ...
1
vote
1answer
85 views

Using multiple versions of jQuery while still calling it like WP likes

I have two JS plugins inside my plugin. One uses jQuery 1.7.1 and the other 1.9.1. I need to have each of them use different version. This is how things are at the moment: Plugin php file: ...
1
vote
2answers
99 views

Adding Font Awesome to WP Plugin

I'm trying to use font awesome icons for my plugin. I've read this page in the codex and this question. Here's what I've tried so far: I've added this on wp-plug-in.php (or should it be somewhere ...
0
votes
1answer
225 views

Using wp_register_style to load CSS in footer?

I realise you can enqueue JS in the footer using wp_register_script as there is a $in_footer parameter for doing so. However, there isn't one for wp_register_style it seems. Is there a way to enqueue ...
0
votes
1answer
77 views

wp_enqueue_style in WordPress plugin class not working

I'm trying to add a stylesheet for my plugin class settings page, but the CSS is not loading. I followed the 2nd example at http://codex.wordpress.org/Function_Reference/wp_register_style to create ...
0
votes
1answer
56 views

Split Media Queries in different files!

I woke up this morning with a thought. Is it a good idea to split the different media queries in different files, check the width of the page in functions.php and then with an IF call the "correct" ...
1
vote
0answers
76 views

How do I view registered syles and scripts for enqueue

I know that wp_register_style(), wp_deregister_style() and wp_enqueue_style() are used for css style registration and enqueue management. However, I am interested in viewing ALL registered styles ...
1
vote
1answer
834 views

Load custom css after bootstrap

I have this in functions.php. How can I modify it so that my custom css is loaded after bootsrap.min.css? function register_css() { wp_register_style( 'bootstrap.min', ...
3
votes
1answer
2k views

Why wp_register_style() is important while I'm using a complete wp_enqueue_style()? [duplicate]

Currently I'm working on a theme, and did some styles and scripts enqueue. When enqueued the scripts, I used wp_register_script() first, and then enqueued with wp_enqueue_script() - because I got ...
0
votes
2answers
276 views

Relative path in wp_register_style not working

I have this function: function test_add_my_stylesheet() { wp_register_style( 'test-admin-style', plugins_url('../css/style.css', __FILE__) ); wp_enqueue_style( 'test-admin-style' ); } but ...
0
votes
2answers
218 views

How to dequeue css files?

I have bought a theme, but on a particular page i don't want to use the theme js/css files. The theme registers the files like function add_our_scripts() { global $post; $options = ...
0
votes
1answer
57 views

Style file inclusion

I am trying to include a flexslider.css file with this code: wp_register_style( 'flexslider', get_template_directory_uri() . '/css/flexslider.css' ); if( is_page( 'home' ) ) { wp_enqueue_style( ...
2
votes
1answer
71 views

Naming script handles right way

I was wondering is there any convention or what is the right way for naming handles in wp_register_script() and wp_register_style() functions? For example if I am developing a plugin that uses ...
1
vote
3answers
453 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 ...
0
votes
1answer
93 views

wp_enqueue doesn't load dependencies

I'm trying to load style.css but rest.css should be included first. I don't understand why reset.css is not included function addMyScript() { wp_register_style('style', ...
1
vote
1answer
1k views

WP deregister, register and enqueue dequeue

a plugin that I bought is loading a few js and css files on all pages, so I wanted to write a new function to deregister the handles, and enqueu them where I wanted. however I am not sure If I have to ...
0
votes
1answer
120 views

Change path/url of admin-bar.min.css

Does anyone know where admin-bar.min.css is registeded/included? Im trying to add a slash in front of admin-bar.min.css, so the admin bar will work correctly on all pages. Im playing arround with a ...
5
votes
1answer
4k 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
1answer
3k views

How do I register/enqueue a custom CSS file?

Good Day. I am using a Wordpress theme and I want to add my own custom CSS. Now I have tried adding my own separate stylesheet after all the other php stylesheet calls in the header.php file. I tried ...
0
votes
1answer
325 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
votes
1answer
413 views

wp_register_script and wp_register_style when shortcode is used

hi so I used a great tutorial off of http://scribu.net/wordpress/optimal-script-loading.html and I am having trouble loading the scripts when a shortcode called lightbox is used here is my code. I am ...
0
votes
1answer
1k 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
696 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 ...
5
votes
1answer
2k views

Load js/css files only on specific admin UI pages

How do I adapt this solution to work with my plugin? (Please see the link). I enqueue my css and js script as follows: function my_plugin_init() { wp_enqueue_script('my_plugin_script', ...
0
votes
1answer
91 views

Need some PHP schoolin'! passing var to url and the old options table

So, I've been building a theme options page, one of the purposes of which is to get some style values to pass to my php stylesheet in the url. Here's what I have: /* Get all theme settings */ ...
27
votes
1answer
6k 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 ...
6
votes
1answer
5k views

Why is style.css not being enqueued?

I got a pretty basic theme and just found out my style.css file doesn't get loaded into the <head>. I already searched around but can't find out, why it's not loading. I inspected the global ...
18
votes
2answers
5k views

Check if a script/style was enqueued/registered

Is it possible to test whether a script or a style was registered using wp_register_script/_style or wp_enqueue_script/_style? All functions doesn't return a value and I'm completely clueless. I ...