RewriteEngine On
RewriteCond %{HTTP_HOST} ^www1\.(.*)$
RewriteCond %{REQUEST_URI} =/robots.txt
RewriteRule ^(.*)$ robots_disallow.txt [L,QSA]
RewriteCond %{HTTP_HOST} !^www\.(.*)$
RewriteCond %{REQUEST_URI} =/robots.txt
RewriteRule ^(.*)$ robots_disallow.txt [L,QSA]
RewriteCond %{HTTP_HOST} ^www\.(.*)$
RewriteCond %{REQUEST_URI} =/robots.txt
RewriteRule ^(.*)$ robots_allow.txt [L,QSA]
<?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 echo get_theme_mod('testtheme_logo'); ?>
$wp_customize->selective_refresh->add_partial('testtheme_logo', array(
'selector' => '.navbar-brand',
'render_callback' => function() {
$img = get_theme_mod('testtheme_logo');
if (is_numeric($img)):
?>
<img src="<?php echo wp_get_attachment_url($img); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
<?php
endif;
},
));
<?php
$queried_object = get_queried_object();
$taxonomy = $queried_object->taxonomy;
$term_id = $queried_object->term_id;
$select_cat_id = get_field('select_categories', $taxonomy . '_' . $term_id);
if(isset($select_cat_id[0])) :
$select_cat_id = $select_cat_id[0];
$select_cat = get_term($select_cat_id);
if($select_cat) :
?>
<li class="product_cat-item product_cat-item-item"><a href="<?php echo get_term_link($select_cat); ?>"><?php echo $select_cat->name; ?></a></li>
<?php endif; endif; ?>
<?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');
?>