A
A
a_turundaev2015-04-04 15:15:05
Opera
a_turundaev, 2015-04-04 15:15:05

Site on WordPress. Why don't firefox/opera/ie include css?

Good day to all!
Please tell me the solution to this problem:
the site: alisa.web-apple.ru/alisa/core is spinning on wordpress.
I include styles and scripts in functions.php

wp_register_style( 'bootstrap', get_template_directory_uri().'/bootstrap-3/css/bootstrap.min.css');
wp_enqueue_style( 'bootstrap' );
wp_register_style( 'rhinoslider', get_template_directory_uri().'/css/rhinoslider-1.05.css');
wp_enqueue_style( 'rhinoslider' );

Chrome is the only one that was able to correctly connect and include styles and scripts. Firefox, for example, included only the first style.
Am I doing something wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel K, 2015-04-04
@PavelK

You are most likely using the styles incorrectly.
Styles need to be connected on the wp_print_styles event
If WP version > 3 then the styles will be connected in the footer, otherwise they will not be displayed at all, or they will be displayed in no one knows where.
For example like this:

add_action('wp_print_styles', 'add_my_stylesheet');

function add_my_stylesheet() {
     $myStyleUrl = WP_PLUGIN_URL . '/myPlugin/style.css';
     wp_register_style('myStyleSheets', $myStyleUrl);
     wp_enqueue_style( 'myStyleSheets');
}

More: https://codex.wordpress.org/%D0%A1%D0%BF%D1%80%D0%...

A
a_turundaev, 2015-04-04
@a_turundaev

The error was in css.
I checked it in Chrome, and it did a disservice - I fixed one style, but other browsers could not do this ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question