0, 'hide_empty' => 0, 'exclude' => '21', 'number' => '0', 'taxonomy' => 'category', 'pad_counts' => true); $category_bg_css = ""; $category_names_array = array(); $imgurl_array = array(); $catlist = get_categories($args); foreach ($catlist as $categories_item) { array_push($category_names_array, $categories_item->cat_name); $cat_id = $categories_item->cat_ID; //get image id $image_id = get_term_meta($cat_id, '_thumbnail_id', 1); //get image url $image_url = wp_get_attachment_image_url($image_id, 'full'); array_push($imgurl_array, $image_url); $add_bg_image_css = ''; if (!empty($image_url) && (is_category($categories_item->cat_name) || is_post_type_archive(mb_strtolower($categories_item->cat_name)))) { $add_bg_image_css = ' .page-header {background-image: url(' . $image_url . ')!important;background-repeat:no-repeat;background-position:center center;} .page-header .page-title {color:#fff;} .page-header .archive-description {color:#fff;} .page-title:after {border-bottom: solid 1px #fff; } .archive-description {color:#fff;}'; } $category_bg_css = $category_bg_css . $add_bg_image_css; } wp_add_inline_style('anirohotellight-style', $category_bg_css); } add_action('wp_enqueue_scripts', 'anirohotellight_bgimage_categories'); //Main menu text color function anirohotellight_main_menu_text_color() { //$menu_text_color = esc_html(get_theme_mod('anirohotellight_mainmenu_text_color')); //$menu_text_color_css = ""; //if (!empty($menu_text_color)) { $menu_text_color_css = ' .main-navigation a:visited {color:#808080;} .main-navigation a, .main-navigation .sub-menu a:hover, .main-navigation .sub-menu a:focus, .main-navigation a:hover,.main-navigation a:focus {color:#808080;} .main-navigation a, .main-navigation ul ul li:last-child a {border-bottom-color:#ccc;} .dropdown-toggle {border-color: #ccc;color: #808080;} .dropdown-toggle:hover, .dropdown-toggle:focus {color: #808080;} .menu-toggle, .menu-toggle:hover,.menu-toggle:focus {color:#808080;} .main-navigation a:hover,.main-navigation a:focus {color:#808080;} .main-navigation li li a:hover,.main-navigation li li a:focus {color:#808080;} #site-navigation{color: transparent;} .main-navigation .sub-menu a{color: #808080;} @media screen and (max-width: 800px) {.main-navigation a:hover {color:#000; }} .main-navigation a.menu-book-now, a.menu-book-now-top {background: #d2691e;border-color:#d2691e;color:#fff;text-decoration:none;} a.menu-book-now-small-screen {background: #d2691e;color:#fff; text-decoration:none;margin-bottom: 0.5em;} .main-navigation a:hover.menu-book-now, a:hover.menu-book-now-top, a:hover.menu-book-now-small-screen, .main-navigation a:visited.menu-book-now, a:visited.menu-book-now-top, a:visited.menu-book-now-small-screen {background: #d2691e;color:#fff; } .front-page-room-container .price {background: #d2691e; } '; //} wp_add_inline_style('anirohotellight-style', $menu_text_color_css); } add_action('wp_enqueue_scripts', 'anirohotellight_main_menu_text_color'); //Change fonts function anirohotellight_google_font_header() { $gfontheader = esc_html(get_theme_mod('anirohotellight_google_font_setting_header')); $fontfamilyheader_custom_css = ''; if ($gfontheader) { $googlefontheader = $gfontheader; } else { $googlefontheader = 'Muli:400,400i,700,700i;subset=latin-ext,vietnamese'; } $fontfamilyheader = $googlefontheader; if (!empty($fontfamilyheader)) { $fontfamilyheader_custom_css = " h1,h2,h3,h4,h5,h6 { font-family:" . $fontfamilyheader . ", sans-serif; } .main-slide-title, .recommended-slide-title { font-family:" . $fontfamilyheader . ", sans-serif; } button, input[type='button'], input[type='reset'], input[type='submit'] { font-family:" . $fontfamilyheader . ", sans-serif; } .section-title, .slidertxt, .slider-link { font-family:" . $fontfamilyheader . ", sans-serif; } .site-title, .site-footer { font-family:" . $fontfamilyheader . ", sans-serif; } "; } wp_add_inline_style('anirohotellight-style', $fontfamilyheader_custom_css); } add_action('wp_enqueue_scripts', 'anirohotellight_google_font_header'); function anirohotellight_google_font_body() { $gfontbody = esc_html(get_theme_mod('anirohotellight_google_font_setting_body')); $fontfamilybody_custom_css = ''; if ($gfontbody) { $googlefontbody = $gfontbody; } else { $googlefontbody = 'Roboto:400,400i,700,700i;subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese'; } $fontfamilybody = $googlefontbody; if (!empty($fontfamilybody)) { $fontfamilybody_custom_css = " body, button, input, select, textarea { font-family:" . $fontfamilybody . ", sans-serif; } .main-navigation, .comment-navigation, .post-navigation,.paging-navigation{ font-family:" . $fontfamilybody . ", sans-serif; } .widget ul, .widget ol, .rssSummary, .widget_calendar { font-family:" . $fontfamilybody . ", sans-serif; }"; } wp_add_inline_style('anirohotellight-style', $fontfamilybody_custom_css); } add_action('wp_enqueue_scripts', 'anirohotellight_google_font_body'); //blog type function anirohotellight_frontpage_type() { $anirohotellight_frontpage_type = esc_html(get_theme_mod('anirohotellight_front_page_type')); $anirohotellight_frontpage_type_css = ""; $anirohotellight_sticky_css = " .sticky:nth-child(odd) .index-box { max-width: 900px;width:100%;} .sticky:nth-child(even) .index-box { max-width: 900px;width:100%;} .sticky:nth-child(odd) .no-sidebar .index-box { max-width: 65em;width:100%;} .sticky:nth-child(odd) .no-sidebar .index-box .article-content-container .inlinedata {float: none;text-align: center;} .sticky:nth-child(odd) .no-sidebar .index-box .featured-image {max-width: 65em;width:100%;float:left;position:relative;} .sticky:nth-child(odd) .no-sidebar .index-box .article-content-container {max-width: 65em;width:100%;float:right;font-size: 100%;padding: 1em;} .sticky:nth-child(even) .no-sidebar .index-box { max-width: 65em;width:100%;} .sticky:nth-child(even) .no-sidebar .index-box .article-content-container .inlinedata {float: none;text-align: center;} .sticky:nth-child(even) .no-sidebar .index-box .featured-image {max-width: 65em;width:100%;float:left;position:relative;} .sticky:nth-child(even) .no-sidebar .index-box .article-content-container {max-width: 65em;width:100%;float:right;font-size: 100%;padding: 1em;} .no-sidebar .sticky:nth-child(odd) .index-box, .no-sidebar .sticky:nth-child(odd){ max-width: 65em;width:100%;} .no-sidebar .sticky:nth-child(odd) .index-box .featured-image {max-width: 65em;width:100%;position:relative;} .no-sidebar .sticky:nth-child(odd) .index-box .article-content-container {max-width: 65em;width:100%;position:relative;} .no-sidebar .sticky:nth-child(even) .index-box, .no-sidebar .sticky:nth-child(even){ max-width: 65em;width:100%;} .no-sidebar .sticky:nth-child(even) .index-box .featured-image {max-width: 65em;width:100%;position:relative;} .no-sidebar .sticky:nth-child(even) .index-box .article-content-container {max-width: 65em;width:100%;position:relative;} .sticky:nth-child(odd) .index-box .featured-image {position: absolute;top: 0; -webkit-transform: translateY(0);-ms-transform: translateY(0);-moz-transform: translateY(0);-o-transform: translateY(0);transform: translateY(0);left:0;} .sticky:nth-child(even) .index-box .featured-image {position: absolute;top: 0; -webkit-transform: translateY(0);-ms-transform: translateY(0);-moz-transform: translateY(0);-o-transform: translateY(0);transform: translateY(0);right:0;} .sticky:nth-child(odd) .index-box .article-content-container {max-width: 900px;width:100%;float:right;} .sticky:nth-child(even) .index-box .article-content-container {max-width: 900px;width:100%;float:right;} .sticky:nth-child(odd) .index-box .featured-image {max-width: 900px;width:100%;float:left;position:relative;} .sticky:nth-child(even) .index-box .featured-image {max-width: 900px;width:100%;float:left;position:relative;} .sticky:nth-child(odd) .index-box .article-content-container .add-share-icon {float:none;text-align: center;} .sticky:nth-child(odd) .index-box .article-content-container .inlinedata {float:none;text-align: center;} .sticky:nth-child(even) .index-box .article-content-container .add-share-icon {float:none;text-align: center;} .sticky:nth-child(even) .index-box .article-content-container .inlinedata {float:none;text-align: center;} .sticky:nth-child(odd) .index-box .article-content-container .entry-content {display:block;} .sticky:nth-child(even) .index-box .article-content-container .entry-content {display:block;} "; if (!empty($anirohotellight_frontpage_type)): switch ($anirohotellight_frontpage_type) { case 'front-page-type1': $anirohotellight_frontpage_type_css = ' .post:nth-child(odd) .index-box { max-width: 900px;width:100%;} .post:nth-child(even) .index-box { max-width: 900px;width:100%;} .post:nth-child(odd) .no-sidebar .index-box { max-width: 65em;width:100%;} .post:nth-child(odd) .no-sidebar .index-box .article-content-container .inlinedata {float: none;text-align: center;} .post:nth-child(odd) .no-sidebar .index-box .featured-image {max-width: 65em;width:100%;float:left;position:relative;} .post:nth-child(odd) .no-sidebar .index-box .article-content-container {max-width: 65em;width:100%;float:right;font-size: 100%;padding: 1em;} .post:nth-child(even) .no-sidebar .index-box { max-width: 65em;width:100%;} .post:nth-child(even) .no-sidebar .index-box .article-content-container .inlinedata {float: none;text-align: center;} .post:nth-child(even) .no-sidebar .index-box .featured-image {max-width: 65em;width:100%;float:left;position:relative;} .post:nth-child(even) .no-sidebar .index-box .article-content-container {max-width: 65em;width:100%;float:right;font-size: 100%;padding: 1em;} .no-sidebar .post:nth-child(odd) .index-box, .no-sidebar .post:nth-child(odd){ max-width: 65em;width:100%;} .no-sidebar .post:nth-child(odd) .index-box .featured-image {max-width: 65em;width:100%;position:relative;} .no-sidebar .post:nth-child(odd) .index-box .article-content-container {max-width: 65em;width:100%;position:relative;} .no-sidebar .post:nth-child(even) .index-box, .no-sidebar .post:nth-child(even){ max-width: 65em;width:100%;} .no-sidebar .post:nth-child(even) .index-box .featured-image {max-width: 65em;width:100%;position:relative;} .no-sidebar .post:nth-child(even) .index-box .article-content-container {max-width: 65em;width:100%;position:relative;} .post:nth-child(odd) .index-box .featured-image {position: absolute;top: 0; -webkit-transform: translateY(0);-ms-transform: translateY(0);-moz-transform: translateY(0);-o-transform: translateY(0);transform: translateY(0);left:0;} .post:nth-child(even) .index-box .featured-image {position: absolute;top: 0; -webkit-transform: translateY(0);-ms-transform: translateY(0);-moz-transform: translateY(0);-o-transform: translateY(0);transform: translateY(0);right:0;} .post:nth-child(odd) .index-box .article-content-container {max-width: 900px;width:100%;float:right;} .post:nth-child(even) .index-box .article-content-container {max-width: 900px;width:100%;float:right;} .post:nth-child(odd) .index-box .featured-image {max-width: 900px;width:100%;float:left;position:relative;} .post:nth-child(even) .index-box .featured-image {max-width: 900px;width:100%;float:left;position:relative;} .post:nth-child(odd) .index-box .article-content-container .add-share-icon {float:none;text-align: center;} .post:nth-child(odd) .index-box .article-content-container .inlinedata {float:none;text-align: center;} .post:nth-child(even) .index-box .article-content-container .add-share-icon {float:none;text-align: center;} .post:nth-child(even) .index-box .article-content-container .inlinedata {float:none;text-align: center;} .type-events .index-box .article-content-container .inlinedata {float:none;text-align: center;} .post:nth-child(odd) .index-box .article-content-container .entry-content {display:block;} .post:nth-child(even) .index-box .article-content-container .entry-content {display:block;} '; break; case 'front-page-type2': $anirohotellight_frontpage_type_css = ' article:nth-child(odd) .index-box, article:nth-child(odd) { max-width: 900px;width:100%;min-height:310px;} article:nth-child(even) .index-box, article:nth-child(even) { max-width: 900px;width:100%;min-height:310px;} .no-sidebar article:nth-child(odd) .index-box, .no-sidebar article:nth-child(odd){ max-width: 65em;width:100%;} .no-sidebar article:nth-child(odd) .index-box .featured-image {max-width: 32.5em;width:50%;position: absolute;top: 50%; -webkit-transform: translateY(-50%);-ms-transform: translateY(-50%);-moz-transform: translateY(-50%);-o-transform: translateY(-50%);transform: translateY(-50%);left:0;} .no-sidebar article:nth-child(odd) .index-box .article-content-container {max-width: 32.5em;width:50%;float:right;font-size: 90%;padding: 1em;} .no-sidebar article:nth-child(even) .index-box, .no-sidebar article:nth-child(even){ max-width: 65em;width:100%;} .no-sidebar article:nth-child(even) .index-box .featured-image {max-width: 32.5em;width:50%;position: absolute;top: 50%; -webkit-transform: translateY(-50%);-ms-transform: translateY(-50%);-moz-transform: translateY(-50%);-o-transform: translateY(-50%);transform: translateY(-50%);left:0;} .no-sidebar article:nth-child(even) .index-box .article-content-container {max-width: 32.5em;width:50%;float:right;font-size: 90%;padding: 1em;} article:nth-child(odd) .index-box .article-content-container { max-width: 400px;width:50%;float:right;font-size: 90%;padding: 1em;} article:nth-child(even) .index-box .article-content-container {max-width: 400px;width:50%;float:right;font-size: 90%;padding: 1em;} article:nth-child(odd) .index-box .featured-image {max-width: 450px;width:50%;position: absolute;top: 50%; -webkit-transform: translateY(-50%);-ms-transform: translateY(-50%);-moz-transform: translateY(-50%);-o-transform: translateY(-50%);transform: translateY(-50%);left:0;} article:nth-child(even) .index-box .featured-image {max-width: 450px;width:50%;position: absolute;top: 50%; -webkit-transform: translateY(-50%);-ms-transform: translateY(-50%);-moz-transform: translateY(-50%);-o-transform: translateY(-50%);transform: translateY(-50%);left:0;} article:nth-child(odd) .index-box .article-content-container .inlinedata {float:none;text-align: center;} article:nth-child(odd) .index-box .article-content-container .add-share-icon {float:none;text-align: center;margin-top:1em;} article:nth-child(odd) .index-box .article-content-container .entry-title {margin-bottom: 1em;margin-top: 1em;} article:nth-child(even) .index-box .article-content-container .inlinedata {float:none;text-align: center;} article:nth-child(even) .index-box .article-content-container .add-share-icon {float:none;text-align: center;margin-top:1em;} article:nth-child(even) .index-box .article-content-container .entry-title {margin-bottom: 1em;margin-top: 1em;} .index-box .cat-links {margin: 0;} article:nth-child(odd) .index-box .article-content-container .entry-content {display:block;} article:nth-child(even) .index-box .article-content-container .entry-content {display:block;} article:nth-child(odd) .index-box .article-content-container .indexeventdate {left: 0;} article:nth-child(even) .index-box .article-content-container .indexeventdate {left: 0;} @media screen and (max-width: 700px) { .format-gallery .index-box .featured-image .gallery-item {margin:0;} .format-gallery .index-box .featured-image {width:100%;float:none;position:relative;margin:1em auto;max-width:900px;} article:nth-child(odd) .index-box .featured-image {position: absolute;top: 0; -webkit-transform: translateY(0);-ms-transform: translateY(0);-moz-transform: translateY(0);-o-transform: translateY(0);transform: translateY(0);left:0;width:100%;float:none;position:relative;margin:1em auto;max-width:900px;} article:nth-child(odd) .index-box .article-content-container {width:100%;float:none;margin:0 auto;max-width:900px;} article:nth-child(even) .index-box .featured-image {position: absolute;top: 0; -webkit-transform: translateY(0);-ms-transform: translateY(0);-moz-transform: translateY(0);-o-transform: translateY(0);transform: translateY(0);left:0;width:100%;float:none;position:relative;margin:1em auto;max-width:900px;} article:nth-child(even) .index-box .article-content-container {width:100%;float:none;margin:0 auto;max-width:900px;} .no-sidebar article:nth-child(odd) .index-box .featured-image {position: absolute;top: 0; -webkit-transform: translateY(0);-ms-transform: translateY(0);-moz-transform: translateY(0);-o-transform: translateY(0);transform: translateY(0);left:0;width:100%;float:none;position:relative;margin:1em auto;max-width:900px;} .no-sidebar article:nth-child(odd) .index-box .article-content-container {width:100%;float:none;margin:0 auto;max-width:900px;} .no-sidebar article:nth-child(even) .index-box .featured-image {position: absolute;top: 0; -webkit-transform: translateY(0);-ms-transform: translateY(0);-moz-transform: translateY(0);-o-transform: translateY(0);transform: translateY(0);left:0;width:100%;float:none;position:relative;margin:1em auto;max-width:900px;} .no-sidebar article:nth-child(even) .index-box .article-content-container {width:100%;float:none;margin:0 auto;max-width:900px;} } '; break; case 'front-page-type3': $anirohotellight_frontpage_type_css = ' article:nth-child(odd) .index-box, article:nth-child(odd) { max-width: 900px;width:100%;min-height:310px;} article:nth-child(even) .index-box, article:nth-child(even) { max-width: 900px;width:100%;min-height:310px;} .no-sidebar article:nth-child(odd) .index-box, .no-sidebar article:nth-child(odd){ max-width: 65em;width:100%;} .no-sidebar article:nth-child(odd) .index-box .featured-image {max-width: 32.5em;width:50%;position: absolute;top: 50%; -webkit-transform: translateY(-50%);-ms-transform: translateY(-50%);-moz-transform: translateY(-50%);-o-transform: translateY(-50%);transform: translateY(-50%);left:0;} .no-sidebar article:nth-child(odd) .index-box .article-content-container {max-width: 32.5em;width:50%;float:right;font-size: 90%;padding: 1em;} .no-sidebar article:nth-child(even) .index-box, .no-sidebar article:nth-child(even){ max-width: 65em;width:100%;} .no-sidebar article:nth-child(even) .index-box .featured-image {max-width: 32.5em;width:50%;position: absolute;top: 50%; -webkit-transform: translateY(-50%);-ms-transform: translateY(-50%);-moz-transform: translateY(-50%);-o-transform: translateY(-50%);transform: translateY(-50%);right:0;} .no-sidebar article:nth-child(even) .index-box .article-content-container {max-width: 32.5em;width:50%;float:left;font-size: 90%;padding: 1em;} article:nth-child(odd) .index-box .article-content-container {max-width: 400px;width:50%;float:right;font-size: 90%;padding: 1em;} article:nth-child(even) .index-box .article-content-container {max-width: 400px;width:50%;float:left;font-size: 90%;padding: 1em;} article:nth-child(odd) .index-box .featured-image {max-width: 450px;width:50%;position: absolute;top: 50%; -webkit-transform: translateY(-50%);-ms-transform: translateY(-50%);-moz-transform: translateY(-50%);-o-transform: translateY(-50%);transform: translateY(-50%);left:0;} article:nth-child(even) .index-box .featured-image {max-width: 450px;width:50%;position: absolute;top: 50%; -webkit-transform: translateY(-50%);-ms-transform: translateY(-50%);-moz-transform: translateY(-50%);-o-transform: translateY(-50%);transform: translateY(-50%);right:0;} article:nth-child(odd) .index-box .article-content-container .inlinedata {float:none;text-align: center;} article:nth-child(odd) .index-box .article-content-container .add-share-icon {float:none;text-align: center;margin-top:1em;} article:nth-child(odd) .index-box .article-content-container .entry-title {margin-bottom: 1em;margin-top: 1em;} article:nth-child(even) .index-box .article-content-container .inlinedata {float:none;text-align: center;} article:nth-child(even) .index-box .article-content-container .add-share-icon {float:none;text-align: center;margin-top:1em;} article:nth-child(even) .index-box .article-content-container .entry-title {margin-bottom: 1em;margin-top: 1em;} .index-box .cat-links {margin: 0;} article:nth-child(odd) .index-box .article-content-container .entry-content {display:block;} article:nth-child(even) .index-box .article-content-container .entry-content {display:block;} article:nth-child(odd) .index-box .article-content-container .indexeventdate {left: 0;} article:nth-child(even) .index-box .article-content-container .indexeventdate {right: 0;} @media screen and (max-width: 800px) { .site-main {margin:0;float:none;} .format-gallery .index-box .featured-image .gallery-item {margin:0;} .format-gallery .index-box .featured-image {width:100%;float:none;position:relative;margin:1em auto;max-width:900px;} article:nth-child(odd) .index-box .featured-image {position: absolute;top: 0; -webkit-transform: translateY(0);-ms-transform: translateY(0);-moz-transform: translateY(0);-o-transform: translateY(0);transform: translateY(0);left:0;width:100%;float:none;position:relative;margin:1em auto;max-width:900px;} article:nth-child(odd) .index-box .article-content-container {width:100%;float:none;margin:0 auto;max-width:900px;} article:nth-child(even) .index-box .featured-image {position: absolute;top: 0; -webkit-transform: translateY(0);-ms-transform: translateY(0);-moz-transform: translateY(0);-o-transform: translateY(0);transform: translateY(0);right:0;width:100%;float:none;position:relative;margin:1em auto;max-width:900px;} article:nth-child(even) .index-box .article-content-container {width:100%;float:none;margin:0 auto;max-width:900px;} .no-sidebar article:nth-child(odd) .index-box .featured-image {position: absolute;top: 0; -webkit-transform: translateY(0);-ms-transform: translateY(0);-moz-transform: translateY(0);-o-transform: translateY(0);transform: translateY(0);left:0;width:100%;float:none;position:relative;margin:1em auto;max-width:900px;} .no-sidebar article:nth-child(odd) .index-box .article-content-container {width:100%;float:none;margin:0 auto;max-width:900px;} .no-sidebar article:nth-child(even) .index-box .featured-image {position: absolute;top: 0; -webkit-transform: translateY(0);-ms-transform: translateY(0);-moz-transform: translateY(0);-o-transform: translateY(0);transform: translateY(0);right:0;width:100%;float:none;position:relative;margin:1em auto;max-width:900px;} .no-sidebar article:nth-child(even) .index-box .article-content-container {width:100%;float:none;margin:0 auto;max-width:900px;} article:nth-child(odd) .index-box .article-content-container .indexeventdate, article:nth-child(even) .index-box .article-content-container .indexeventdate {top:4em;} } @media screen and (max-width: 640px) { article:nth-child(odd) .index-box .article-content-container .indexeventdate, article:nth-child(even) .index-box .article-content-container .indexeventdate {top:4.5em;} } '; break; } endif; $anirohotellight_frontpage_type_full_css = $anirohotellight_frontpage_type_css . $anirohotellight_sticky_css; wp_add_inline_style('anirohotellight-style', $anirohotellight_frontpage_type_full_css); } add_action('wp_enqueue_scripts', 'anirohotellight_frontpage_type'); //There is not sidebar on front page function anirohotellight_front_page_css() { $front_page_css = ""; if (is_front_page()) { $front_page_css = ' .site-content {font-size: 1em;line-height: 1.5em;margin: 0 auto;max-width: 100%;background: #fff;width:100%;} .site-main {max-width: 100%;width:100%;margin: 0 auto;} '; wp_add_inline_style('anirohotellight-style', $front_page_css); } } add_action('wp_enqueue_scripts', 'anirohotellight_front_page_css'); /* How many rooms you want to show in one line: */ function anirohotellight_rooms_numbers_rooms() { $rooms_in_line = intval(get_theme_mod('anirohotellight_rooms_numbers')); $rooms_in_line_css = ""; if (!empty($rooms_in_line) && ($rooms_in_line === 3)) { $rooms_in_line_css = '#front-page-rooms .front-page-room-container {width: 28%; } @media screen and (max-width: 900px) { #front-page-rooms .front-page-room-container {width: 49%;} } @media screen and (max-width: 500px) { #front-page-rooms .front-page-room-container {width: 90%;float:none; margin: 0.5em auto;} } '; } else { $rooms_in_line_css = '#front-page-rooms .front-page-room-container {width: 24%; } @media screen and (max-width: 950px) { #front-page-rooms .front-page-room-container {width: 49%;} } @media screen and (max-width: 430px) { #front-page-rooms .front-page-room-container {width: 90%; float:none; margin: 0.5em auto;} } '; } wp_add_inline_style('anirohotellight-style', $rooms_in_line_css); } add_action('wp_enqueue_scripts', 'anirohotellight_rooms_numbers_rooms'); /* How many postss you want to show in section "Blog": */ function anirohotellight_posts_numbers() { $posts_number = intval(get_theme_mod('anirohotellight_rooms_numbers')); $posts_number_css = ""; if (!empty($posts_number) && ($posts_number === 3)) { $posts_number_css = ' .front-page-blog-container {width: 28%;} .front-page-blog-container .blog-text .main-slide-title{font-size: 100%;} @media screen and (max-width: 900px) { .front-page-blog-container {width: 49%;} } @media screen and (max-width: 500px) { .front-page-blog-container {width: 90%;} } '; } else { $posts_number_css = ' .front-page-blog-container {width: 24%;} .front-page-blog-container .blog-text .main-slide-title{font-size: 100%;} @media screen and (max-width: 950px) { .front-page-blog-container {width: 49%;} } @media screen and (max-width: 430px) { .front-page-blog-container {width: 90%; float:none; margin: 0.5em auto;} } '; } wp_add_inline_style('anirohotellight-style', $posts_number_css); } add_action('wp_enqueue_scripts', 'anirohotellight_posts_numbers'); /* Make section title white if there is bg img */ function anirohotellight_section_title_white() { $main_color = esc_html(get_theme_mod('anirohotellight_main_color')); $title_white_css0 = ''; $title_white_css00 = ''; $title_white_css000 = ''; $title_white_css0000 = ''; $title_white_css1 = ''; $title_white_css2 = ''; $title_white_css3 = ''; $title_white_css4 = ''; $title_white_css5 = ''; $title_white_css6 = ''; $title_white_css = ' #front-page-services .section-title {color: #fff;} #front-page-services .section-title .block {background: #fff;} #front-page-services .section-title .block:after {border-top-color: #fff;} #front-page-services .slick-dots li button:before {color: #fff;} #front-page-services .slick-dots li.slick-active button:before {color: #fff;} #front-page-testimonials .section-title {color: #fff;} #front-page-testimonials .section-title .block {background: #fff;} #front-page-testimonials .section-title .block:after {border-top-color: #fff;} #front-page-testimonials .slick-dots li button:before {color: #fff;} #front-page-testimonials .slick-dots li.slick-active button:before {color: #fff;} #front-page-advertisement .section-title {color: #fff;} #front-page-advertisement .section-title .block {background: #fff;} #front-page-advertisement .section-title .block:after {border-top-color: #fff;} '; if (esc_html(get_theme_mod('anirohotellight_services_bg_filtr')) === "#ffffff" && esc_html(get_theme_mod('anirohotellight_services_bg_filtr_alpha')) === '1') { $title_white_css00 = ' #front-page-services .section-title{padding-top:0.5em; padding-bottom:0;color:#aaa;} #front-page-services .slick-dots li button:before, #front-page-services .slick-dots li.slick-active button:before, #front-page-services .see-services {color: '. $main_color .';} #front-page-services .service-icon, .front-page-service-container a {color: '. $main_color .';} .front-page-service-container a:hover, .front-page-service-container a:focus, .front-page-service-container a:visited { color:'. $main_color .'; } '; } else { $title_white_css0 = ' #front-page-services .section-title {padding-top:0.5em; padding-bottom:0;color:#fff;} #front-page-services .see-services,#front-page-services .link-see-services a:hover,#front-page-services .link-see-services a:active,#front-page-services .link-see-services a:focus, .front-page-service-container a:hover, .front-page-service-container a:focus,.front-page-service-container a:active {color:#fff;} #front-page-services .slick-dots li button:before, #front-page-services .slick-dots li.slick-active button:before, #front-page-services .section-title:first-letter {color: #fff;} '; } if (esc_html(get_theme_mod('anirohotellight_testimonials_bg_filtr')) === "#ffffff" && esc_html(get_theme_mod('anirohotellight_testimonials_bg_filtr_alpha')) === '1') { $title_white_css0000 = ' #front-page-testimonials .section-title{padding-top:0.5em; padding-bottom:0;color:#aaa;} #front-page-testimonials .slick-dots li button:before, #front-page-testimonials .slick-dots li.slick-active button:before {color: '. $main_color .';} .testimonial-container .testimonial-text, .testimonial-container .testimonial-title { color: #020202;} '; } else { $title_white_css000 = ' #front-page-testimonials .section-title {padding-top:0.5em; padding-bottom:0;color:#fff;} #front-page-testimonials .slick-dots li button:before, #front-page-testimonials .slick-dots li.slick-active button:before, #front-page-testimonials .section-title:first-letter {color: #fff;} .testimonial-container .testimonial-text, .testimonial-container .testimonial-title { color: #fff;} '; } if ((esc_html(get_theme_mod('anirohotellight_advertisement_bg_filtr')) === "#ffffff" && esc_html(get_theme_mod('anirohotellight_advertisement_bg_filtr_alpha')) === '1')&&(esc_html(get_theme_mod('anirohotellight_advertisement_bg'))==='')) { $title_white_css5 = ' #front-page-advertisement .section-title{padding-top:0.5em; padding-bottom:0.5em;color:#aaa;} #front-page-advertisement .advertisement-text {color: #020202;} #front-page-advertisement .advertisement-link {color: '. $main_color .';} '; } else { $title_white_css2 = ' #front-page-advertisement .section-title{padding-top:0.5em; padding-bottom:0.5em;color:#fff;} #front-page-advertisement .advertisement-text {color: #fff;} #front-page-advertisement .section-title:first-letter {color: #fff;} #front-page-advertisement .advertisement-link a {color: #fff;} '; } $title_white_css .=$title_white_css0; $title_white_css .=$title_white_css00; $title_white_css .=$title_white_css000; $title_white_css .=$title_white_css0000; $title_white_css .=$title_white_css1; $title_white_css .=$title_white_css2; $title_white_css .=$title_white_css3; $title_white_css .=$title_white_css4; $title_white_css .=$title_white_css5; $title_white_css .=$title_white_css6; wp_add_inline_style('anirohotellight-style', $title_white_css); } add_action('wp_enqueue_scripts', 'anirohotellight_section_title_white'); //Main menu placement function anirohotellight_menu_placement() { $title_plac = 'top'; $menu_placement_css = ""; if ($title_plac !== 'menu') { $menu_placement_css = ' #site-navigation{text-align: center;} .toggled .sub-menu li a {text-align: left;} .toggled .nav-menu li a {text-align: left;} '; } wp_add_inline_style('anirohotellight-style', $menu_placement_css); } add_action('wp_enqueue_scripts', 'anirohotellight_menu_placement'); //Site title and logo position in the top function anirohotellight_title_placement_in_the_top() { $title_placement = 'top'; $title_placement_css = ""; $hide_data = esc_html(get_theme_mod('anirohotellight_top_options_hide_data')); if ($title_placement === 'top') { if (!empty($title_placement) && ($hide_data === '1')): $title_placement_css = ' .site-branding {text-align: center;position: relative;float: none;margin: 0 auto;} '; endif; } if ($title_placement === 'top-button') { if (!empty($title_placement) && ($hide_data === '1')): $title_placement_css = ' .site-branding {text-align: center;position: relative;float: left;margin: 0 auto;} .info-in-right {float:right;} } '; endif; } wp_add_inline_style('anirohotellight-style', $title_placement_css); } add_action('wp_enqueue_scripts', 'anirohotellight_title_placement_in_the_top'); //Site title position function anirohotellight_sitetitle_placement_menu() { $title_placement = 'top'; $title_placement_css = ""; $logo = esc_html(get_theme_mod('anirohotellight_logo')); if ($title_placement === 'menu') { if ($logo !== '') { $title_placement_css = ' .page-title {padding-top: 8em;padding-bottom: 6em;} .site-branding {text-align: left;position: relative;float:none;width: 30%; display:inline-block;padding: 0 1em 0 1em;margin: 0 auto;max-width:300px;} .site-branding .title-container {margin-left: 10px;text-align: left;} #site-navigation{display:inline-block; text-align: right;float:right;width: calc(100% - 300px);} .toggled .sub-menu li a {text-align: left;} .toggled .nav-menu li a {text-align: left;} @media screen and (max-width: 1100px){ .site-branding .title-container {text-align: center;} } @media screen and (max-width: 800px){ .site-branding {width: 100%;max-width: 100%;text-align: center;} #site-navigation {width: 100%;text-align:left;height:1px;} .menuu {width: 100%;text-align:left;background:#fff;} .menu-toggle{left:0; position:absolute; bottom: 0%; } .main-navigation a.menu-book-now {top:15px;} } @media screen and (max-width: 500px){ .site-branding {text-align: right;} .info-near-title {display: none;} } '; } if ($logo === '') { $title_placement_css = ' .site-branding {text-align: left;position: relative;float:none; display:inline-block; padding: 0 1em 0 1em;margin: 0;max-width:300px;} .site-branding .title-container {text-align: center;} #site-navigation{display:inline-block;text-align: right;float:right;width: calc(100% - 300px);} .toggled .sub-menu li a {text-align: left;} .toggled .nav-menu li a {text-align: left;} @media screen and (max-width: 1100px){ .site-branding {text-align: center;} #site-navigation {width: 100%;text-align:left;} } @media screen and (max-width: 800px){ .main-navigation a.menu-book-now {top:3em;} } @media screen and (max-width: 500px){ .info-near-title {display: none;} .site-branding {float:none;margin:0 auto;display:block;} } '; } } else { if ($logo !== '') { $title_placement_css = ''; } } wp_add_inline_style('anirohotellight-style', $title_placement_css); } add_action('wp_enqueue_scripts', 'anirohotellight_sitetitle_placement_menu'); //css for map function anirohotellight_hide_show_address() { $address = esc_html(get_theme_mod('anirohotellight_frontpage_address_show')); $address_css = ""; if (!empty($address) && ($address === '1')) { $address_css = '#map_canvas {margin-top: 0.5em;}'; } else { $address_css = '#map_canvas {margin-top: 2em;}'; } wp_add_inline_style('anirohotellight-style', $address_css); } add_action('wp_enqueue_scripts', 'anirohotellight_hide_show_address'); //CSS for img in section About function anirohotellight_about_imgs() { $img1 = esc_html(get_theme_mod('anirohotellight_about_img_1')); $img2 = esc_html(get_theme_mod('anirohotellight_about_img_2')); $img3 = esc_html(get_theme_mod('anirohotellight_about_img_3')); $img_about_css = ""; if (($img1!=='')&&($img2!=='')&&($img3==='')) { $img_about_css = '.about-image1 {width: 50%;height: 100%;display:block; } .about-image2 {width: 50%;height: 100%;display:block;} .about-image3 { width: 40%;height: 50%;display:none;}'; } elseif (($img1!=='')&&($img3!=='')&&($img2==='')) { $img_about_css = '.about-image1 {width: 50%;height: 100%;display:block; } .about-image2 {width: 40%;height: 50%;display:none;} .about-image3 { width: 50%;height: 100%;display:block;}'; } elseif (($img2!=='')&&($img3!=='')&&($img1==='')) { $img_about_css = '.about-image1 {width: 60%;height: 100%;display:none; } .about-image2 {width: 50%;height: 100%;display:block;} .about-image3 { width: 50%;height: 100%;display:block;}'; } elseif (($img1!=='')&&($img2==='')&&($img3==='')) { $img_about_css = '.about-image1 {width: 100%;height: 100%;display:block; } .about-image2 {width: 40%;height: 50%;display:none;} .about-image3 { width: 40%;height: 50%;display:none;}'; } elseif (($img1==='')&&($img2!=='')&&($img3==='')) { $img_about_css = '.about-image1 {width: 100%;height: 100%; display:none;} .about-image2 {width: 100%;height: 100%;display:block;} .about-image3 { width: 100%;height: 100%;display:none;}'; } elseif (($img1==='')&&($img2==='')&&($img3!=='')) { $img_about_css = '.about-image1 {width: 100%;height: 100%;display:none; } .about-image2 {width: 100%;height: 100%;display:none;} .about-image3 { width: 100%;height: 100%;display:block;}'; } else { $img_about_css = '.about-image1 {width: 60%;height: 100%;display:block; } .about-image2 {width: 40%;height: 50%;display:block;} .about-image3 { width: 40%;height: 50%;display:block;}'; } wp_add_inline_style('anirohotellight-style', $img_about_css); } add_action('wp_enqueue_scripts', 'anirohotellight_about_imgs'); //There is not sidebar on front page function anirohotellight_front_page_footer_css() { $hide_contact_form = esc_html(get_theme_mod('front_page_show_hide_contactform')); $hide_contact = esc_html(get_theme_mod('front_page_show_hide_contacts')); $blog = esc_html(get_theme_mod('front_page_show_hide_blog')); $front_page_footer_css = ""; if ((is_front_page()&&($hide_contact_form==='1')&&($hide_contact!=='1'))||(is_front_page()&&($hide_contact==='1')&&($blog==='1'))) { $front_page_footer_css = ' .site-footer {margin-top: 0;} '; } wp_add_inline_style('anirohotellight-style', $front_page_footer_css); } add_action('wp_enqueue_scripts', 'anirohotellight_front_page_footer_css'); /** * This function adds some styles to the WordPress Customizer */ function hotel_wp_customizer_styles() { ?>