A safe way to add/enqueue a CSS style file to the wordpress generated page. If it was first registered with wp_register_style() it can now be added using its handle.

learn more… | top users | synonyms

0
votes
2answers
24 views

Creating Admin Options Page where users can make changes to a theme

I need help to finish this last bit of php code. I'm trying to create an admin options page similar to in admin>settings>discussions like how a user can select an avatar, but instead of selecting an ...
0
votes
1answer
17 views

Including Styles and JS files to work ON my plugin interface

Hey WordPress community, I've been having a couple of issues with trying to add a stylesheet and a JavaScript file which run on my plugin interface. So far i have this: ...
0
votes
1answer
19 views

Wordpress-child problem with many css files in parent theme

Ok, So I'm trying to setup a child theme and can't manage to solve the problem with many different css files in parent theme. When I look at codex guide it's just give example on how to setup it with ...
1
vote
1answer
72 views

Enqueue stylesheets if parent theme has more than one .css file

I just learnt about creating child themes from the Codex , it says to add add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( ...
1
vote
1answer
21 views

How to switch css files according to devices and button click?

I am trying to enqueue a responsive css file if the website is opened on mobile devices. Also I want to switch / enqueue a default or non-responsive css file when a button is clicked. The ...
0
votes
1answer
19 views

Adding inline styles from a widget

I'm working on a theme that has an optional widget to allow users to put some site elements where they want. One of those is a list of social media icons. These are font icons, so they can be styled ...
0
votes
1answer
25 views

Enqueue CSS file for registeration form - Multisite

What is the best way to enqueue a css file for the register form for a multisite? wp_enqueue_scripts/styles works, but I would prefer it to not keep loading on the frontend all the time as it is only ...
1
vote
1answer
16 views

Stylesheet not loaded on register page

Using WordPress 4.2.2. Im trying to add some custom fields to the registration page. I have gotten the fields to show up there now, but for some reason i cannot get the stylesheet to load there too. ...
0
votes
0answers
17 views

What's the best way to dequeue / remove uncooperative scripts and styles?

So we've got wp_dequeue_script, wp_dequeue_style as well as wp_deregister_styleand wp_dequeue_script... These work well, as long as they've been called correctly in the first place. Some plugins, ...
0
votes
1answer
28 views

Enqueueing Scripts and Styles to page template that has html

I built a custom calculator using html5, css3, and jQuery. I have it live and it works well but now someone would like to put my calc on their WP website and we can not figure out how to get it on his ...
2
votes
1answer
42 views

$wp_styles->registered not giving ALL the styles?

I'm pretty new to Wordpress programming (been using it for a while, but never got into the nitty gritty). So, I'm trying to "minify" some JS/CSS files into common ones. I'm manually joining the files ...
0
votes
1answer
31 views

Plugin Development - Class Constructor Not Firing wp_enqueue_style action hook

Writing my first Wordpress plugin that uses a Class approach. It is being called on a page via a shortcode. In testing, the shortcode is working and the shortcode specific php file is being loaded. ...
0
votes
2answers
36 views

Deregister scripts from plugin

I have an own class that deregisters all scripts and styles and creates 2 cached files one for scripts and one for styles that is registered in the end. This runs inside theme, my problem is that I ...
0
votes
1answer
32 views

Controling css order

In my plugin I need to load css file after the standard style.css. I tried to do that with the priority paramter in the enqueue command but that works only if I modify the specificity of the ...
0
votes
2answers
35 views

Should we explicitely enqueue jQuery and our theme's main stylesheet?

I noticed that if I don't explicitely enqueue my theme's main stylesheet and jQuery in my functions.php, these are loaded anyway. But perhaps it's better for some reason to enqueue them ? What is the ...
2
votes
1answer
40 views

How does one load style.css into a theme?

I've looked up the codex, some tutorials and they talk about adding custom css, but I couldn't find where do I add the style.css? I did this, and still it won't have any effect. /** * Proper way to ...
0
votes
1answer
75 views

@font-face broken in child theme

In my site I'm using Bootstrap for the basic structure (bootstrap.min.css), and using my own stylesheet (style.css) for further enhancements or modification. I declared @font-face in my stylesheet ...
0
votes
2answers
55 views

custom post with loading script per single post

I read many Q&As here on SO...(and elsewhere but they don't count...lol) I think I follow the rules of WP.org but still it does not load the scripts. Scenario: Custom template for post in Php: ...
0
votes
1answer
71 views

Use wp_enqueue_scripts, not wp_print_styles?

Everywhere is said that you need to use wp_enqueue_scripts() instead of wp_print_styles(). wp_print_styles() is located in wp-includes/functions.wp-styles.php. So what does it mean? What should I ...
1
vote
0answers
112 views

why this media query is not working / not loading when I put it in child theme?

I am trying to create a separate style sheet for responsive behavior in a site. my folder structure: magzine/style.css magazine-child/style.css magazine-child/responsive.css Magazine is my theme ...
0
votes
1answer
65 views

FullCalendar in WordPress is not working

I'm trying to implement FullCalendar on my WordPress website in order to display the Hebrew calendar from the Hebcal API. I believe I have loaded all the requisite scripts and styles via use of the ...
0
votes
0answers
16 views

How can I to add css or js to wp_head from shortcodes or widgets? [duplicate]

How can I to add css or js to wp_head generated from shortcodes or widgets?
1
vote
1answer
116 views

How to load css in the footer [duplicate]

I was trying to move the load of my style.css in the footer of my wordpress theme. I have already done something similar with 2 js files and it works fine, they load in the footer: function my_init() ...
0
votes
0answers
12 views

Is it possible to use login_enqueue_scripts to add the stylesheet to head section? [duplicate]

here where I'm having trouble: I need to add my styleshhet to the WordPress login page among the tags <head></head> but my code doesn't work, it always enqueue the stylesheet before ...
0
votes
1answer
51 views

Custom Plugin - CSS works, JS doesn't

In the plugin I'm making, I use separate js and css files (____.js, ____.css). This is the first time that I've included an external .js file in anything. I'm registering and enqueueing both in the ...
1
vote
2answers
272 views

Prevent Version URL Parameter (?ver=X.X.X) on Enqueued Styles & Scripts

Use Case I've been experimenting with Chrome's Dev Tools Workspace features. It includes the ability to edit a file directly in Dev Tools and have the saved stylesheet refresh itself (or even compile ...
0
votes
1answer
68 views

How do I get shortcode, widget and template tag CSS to load in the head only as required? [duplicate]

I have a shortcode, widget and template tag that need to load CSS. I am registering in init, and enqueueing as required. The only problem is, it is adding the CSS loader at the bottom of the page, ...
0
votes
1answer
52 views

font style is not working on domain

I have two domains, one http://www.eu-ohne-mpu-fs.de/, second: http://eu-bw.de/. Second domain is the one where Wordpress Adress(URL) and Domain Adress(URL) is set. First one is pointing to the ...
4
votes
1answer
92 views

How to use wp_dequeue_style() for style enqueued in WP_Widget class

I've got a plugin that makes a widget that enqueues some front-end CSS to style the widdget. I call wp_enqueue_style from the public widget() method in the extended WP_Widget class: <?php class ...
0
votes
1answer
39 views

Modify arguments for parent theme's `wp_register_style` via child theme

Working on a child theme for site with a good deal of separate stylesheets being registered/enqueued from the theme and plugins. I'd like to change some attributes of the <link> tags in the ...
0
votes
0answers
17 views

Enqueue all styles used by Buddypress & its plugins

I am pulling certain functions and widgets from buddypress via ajax to display them on my startpage - activity-stream, activity-update-form etc. As my startpage is a WP-page with my own plugin (which ...
0
votes
0answers
46 views

Child Theme for WooCommerce's Upstart

I'm having trouble with the Child Themes concept, and I am using WooCommerce's Upstart Theme. After Reading the Wordpress Documentation on Child Themes, I attempting to implement a Child Theme for the ...
0
votes
1answer
26 views

Enqueuing scripts and styles in custom plugins

I have a couple of questions regarding enqueuing scripts and styles in custom plugin code. I've recently come across plugin code where scripts were enqueued hooing into the template_redirect action ...
0
votes
0answers
12 views

How to make sure Child styles load after Parent styles [duplicate]

I have setup a child theme for my site. However I'm having trouble getting some of my CSS styles to work properly because some of them load before the parent style and therefore become overruled by ...
0
votes
0answers
78 views

How to enqueue both style.css and style-mobile.css in child theme

This is pretty basic, but I'm not sure what I'm doing. I have setup a child theme and I'm able to edit my child theme style.css and make changes successfully. However I'm unable to enqueue the ...
0
votes
1answer
2k views

Move all the JS files to the bottom|footer, the right way

In order to speedup my site load and prevent scripts from render the page I'm trying to move all the possible scripts (meaning JS files) from head to footer. After read and do some research I made ...
0
votes
1answer
77 views

Enqueuing a stylesheet and ensuring it's loaded before (not after) the theme's stylesheet

In wp_enqueue_style()'s doc I see the third parameter is for stylesheets to be loaded before the one called by the function. But is it possible to do the contrary, meaning to instruct WP to load a ...
3
votes
1answer
85 views

Enqueue a css using negative conditional tags

I'm building a theme on top of purecss.io. In order to make the grid responsive I need to add this stylesheet. From functions.php function load_css() { wp_enqueue_style ( 'purecss-all-not-ie', ...
0
votes
2answers
39 views

wp_enqueue_script stopped working

I'm facing a strange problem. After I've moved to another server, my wp_enqueue_script calls don't do anything. I do have this function: function moemax_scripts() { wp_enqueue_style( ...
0
votes
0answers
18 views

Most optimal way of starting fresh, without using other theme or dropping old files?

I have an unusual situation: A website with very trashed styles.css (thousands of lines of trashy code), around 70+ custom templates, tons of js libraries loaded. First reaction was, lets start fresh ...
0
votes
2answers
214 views

The correct way to include JavaScript and CSS in my WordPress Themes

I'm trying to build my own Wordpress theme using the correct ways. But... The first trouble that I found was how to add css and js "using the correct way". I found severals tutorials how to do it. ...
0
votes
0answers
7 views

Enqueue css after shortcode [duplicate]

I am writing a plugin (video player) which has few different stylesheets (separate css files) based on its look. My problem is that I know which css file I need to enqueue after I read shortcode ...
0
votes
1answer
57 views

Best way to enqueue CSS and JS in a specific location

I'm putting CSS and javascript files in a created directory inside a created directory inside wp-content and my enqueue code is going in an mu-plugin. Due to how I have set-up my wordpress multisite ...
1
vote
1answer
61 views

How to enqueu php files with custom variable & conditionals?

Hi I have taken over a website with half-customized theme. It was an outdated theme with bunch of scripts and formatting. Currently I encountered a small issue when enqueue stylesheets in ...
0
votes
0answers
27 views

How can I properly enqueue tags <link> in WordPress to use with Web Components?

The Chrome browser supports Web Components and I would like to add a number of them in WordpPress pages, but using the queuing mechanism as in the case of the functions wp_enqueue_script and ...
0
votes
1answer
75 views

Understanding wp_enqueue_style

I am trying to understand how wordpress works, but I am having issue understanding how wp_enqueue_style(), wp_enqueue_script() works in relation to page output. From my understanding, these functions ...
0
votes
0answers
27 views

Enqueue more than 2 scripts from cdn with a callback

this subject has been covered here and it works but my questions is how to do this for more urls? for example i need to load bootsrap js / css, font awesome, animated.css from external cdn but with ...
0
votes
1answer
120 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 ...
0
votes
1answer
133 views

custom template - override plugin template in child theme - issue with scripts

I'm using a custom template for the single-listing.php from WP Listings. I've used my own theme (Canvas by woothemes) single post template, and included the wp-listings code. ...
1
vote
1answer
54 views

Loading custom CSS

I've done some searching and can't seem to find the appropriate solution for a particular problem I'm having. I've created an option within one of my themes that allows the user to edit any element ...