body
..page-id-9 #right-sidebar .widget h4:before {
font-family: "FontAwesome";
content: "\f072";
padding: 0 10px 0 0;
}
.page-id-787 #right-sidebar .widget h4:before {
font-family: "FontAwesome";
content: "\f073";
padding: 0 10px 0 0;
}
<?php
function pockets_register_styles() {
wp_enqueue_style( 'pockets-bootstrap', get_template_directory_uri() . '/css/bootstrap.css' );
wp_enqueue_style( 'pockets-mainstyle', get_stylesheet_uri() );
}
add_action( 'wp_enqueue_scripts', 'pockets_register_styles' );
?>
Или мобильную версию возможно сделать в одной установке WordPress?
function enqueue_versioned_script( $handle, $src = false, $deps = array(), $in_footer = false ) {
wp_enqueue_script( $handle, get_stylesheet_directory_uri() . $src, $deps, filemtime( get_stylesheet_directory() . $src ), $in_footer );
}
function enqueue_versioned_style( $handle, $src = false, $deps = array(), $media = 'all' ) {
wp_enqueue_style( $handle, get_stylesheet_directory_uri() . $src, $deps = array(), filemtime( get_stylesheet_directory() . $src ), $media );
}
function themename_scripts() {
enqueue_versioned_style( 'themename', '/style.css' );
enqueue_versioned_script( 'themename', '/js/scripts.js', array( 'jquery'), true );
}
add_action( 'wp_enqueue_scripts', 'themename_scripts' );
<link rel='stylesheet' id='themename-css' href='http://example.com/wp-content/themes/themename/style.css?ver=1429693860' type='text/css' media='all' />
<script type='text/javascript' src='http://example.com/wp-content/themes/themename/js/scripts.js?ver=1429694775'></script>
В чем проблема? Куда копать?
body {
background-image: url("/wp-content/uploads/2017/08/fon_first.jpg");
background-repeat: no-repeat;
background-size: cover;
background-position: top;
}
.site-header {
background-image: url("/wp-content/uploads/2017/08/header_first.jpg");
background-repeat: no-repeat;
background-size: cover;
<?php
$class = array();
if( is_active_sidebar( 'left-sidebar' ) {
$class[] = 'with-left-sidebar';
}
if( is_active_sidebar( 'right-sidebar' ) {
$class[] = 'with-right-sidebar';
}
?>
<div class="main <?php echo implode(' ', $class); ?>">
</div>
.with-left-sibebar {
width: 600px;
}
.with-right-sibebar {
width: 600px;
}
.with-left-sibebar.with-right-sibebar {
width: 300px;
}
<?php
function b2w_theme_styles() {
wp_enqueue_style( 'bootstrap_css', get_template_directory_uri() . '/css/bootstrap.css');
wp_enqueue_style( 'style_css', get_template_directory_uri() . '/css/style.css');
wp_enqueue_style( 'jasny_bootstrap_css', get_template_directory_uri() . '/css/jasny-bootstrap.min.css');
}
add_action ('wp_enqueue_scripts', 'b2w_theme_styles');
function b2w_theme_js() {
wp_enqueue_scripts( 'bootstrap_js', get_template_directory_uri() . '/js/bootstrap.js', array('jquery'), '', true);
wp_enqueue_scripts( 'jasny_bootstrap_js', get_template_directory_uri() . '/js/jasny-bootstrap.min.js', array( 'jquery'), '', true);
}
add_action ('wp_enqueue_scripts', 'b2w_theme_js');
?>