Как открепить блок (логотип и часть шапки) при скроллинге
30.05.2022, 19:35. Показов 3723. Ответов 20
Всем привет.
Есть сайт https://sadovii.ru/.
При прокручивании страниц сайта вниз логотип и кнопки навигации прилипают и накладываются на основной текст сайта в версии для ПК и на мобильных устройствах до самого футера.
Никак не могу найти где это закреплено. В файле header.php этот блок кода есть, но не полный и правка файла ничего не меняет. Прикрепляю скриншоты, header, css и function.php. Буду благодарен за любую помощь.
header.php | PHP | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
| <?php
/**
* The header for our theme.
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @package Agencyup
*/
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="yandex-verification" content="b680d7c973334f10" />
<!-- партнерка -->
<meta name="verify-admitad" content="5eecd45f57" />
<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
<link rel="pingback" href="<?php echo esc_url(get_bloginfo( 'pingback_url' )); ?>">
<?php endif; ?>
<?php wp_head(); ?>
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
ym(88730937, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true,
ecommerce:"dataLayer"
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/88730937" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<meta name="yandex-verification" content="36dece5046033b08" />
<!-- Yandex.RTB -->
<script>window.yaContextCb=window.yaContextCb||[]</script>
<script src="https://yandex.ru/ads/system/context.js" async></script>
</head>
<body <?php body_class(); ?> >
<?php wp_body_open(); ?>
<a class="skip-link screen-reader-text" href="#content">
<?php esc_html_e( 'Skip to content', 'financey' ); ?></a>
<div class="wrapper">
<header class="bs-headwidget">
<?php do_action('icycp_financey_top_header'); ?>
<!-- Main Menu Area-->
<div class="bs-main-nav">
<nav class="navbar navbar-expand-lg navbar-wp">
<div class="container mobi-menu">
<!-- Logo image -->
<div class="navbar-header col-12">
<?php the_custom_logo();
if (display_header_text()) : ?>
<div class="site-branding-text navbar-brand">
<h2 class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<?php
echo esc_html(get_bloginfo('name'));
?>
</a>
</h2>
<p class="site-description"><?php echo esc_html(bloginfo('description')); ?></p>
<a href="tel:+79139357296" style="color: #B50700;">
<p style="text-align: center; color: #87D656"><b>звоните</b></p>
<b>8 913 935 72 96</b>
</a>
</div>
<?php endif; ?>
<!-- navbar-toggle -->
<!-- /Logo -->
<div class="desk-header d-flex pl-3 ml-auto my-2 my-lg-0 position-relative align-items-center">
<?php $hide_show_nav_menu_btn = get_theme_mod('hide_show_nav_menu_btn','1');
$menu_btn_label = get_theme_mod('menu_btn_label');
$menu_btn_link = get_theme_mod('menu_btn_link');
$menu_btn_target = get_theme_mod('menu_btn_target','1');
if($hide_show_nav_menu_btn == '1') { if($menu_btn_label) { ?>
<a <?php if($menu_btn_target == '1') { ?> target ="_blank" <?php } ?> href="<?php echo esc_url($menu_btn_link); ?>" class="btn btn-theme"><?php echo esc_html($menu_btn_label); ?></a>
<?php } } ?>
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="close fa fa-times"></span>
<span class="navbar-toggler-icon"><i class="fas fa-bars"></i></span>
</button>
</div>
</div>
</div>
<div class="container desk-menu">
<!-- Logo image -->
<div class="navbar-header">
<?php the_custom_logo();
if (display_header_text()) : ?>
<div class="site-branding-text navbar-brand">
<h2 class="site-title"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<?php
echo esc_html(get_bloginfo('name'));
?></a></h2>
<p class="site-description"><?php echo esc_html(bloginfo('description')); ?></p>
</div>
<?php endif; ?>
</div>
<!-- /Logo -->
<!-- /navbar-toggle -->
<!-- Navigation -->
<div class="collapse navbar-collapse">
<?php wp_nav_menu( array(
'theme_location' => 'primary',
'container' => 'collapse navbar-collapse',
'menu_class' => 'nav navbar-nav ml-auto',
'fallback_cb' => 'agencyup_fallback_page_menu',
'walker' => new agencyup_nav_walker()
) );
?>
</div>
<div class="desk-header d-flex pl-3 ml-auto my-2 my-lg-0 position-relative align-items-center">
<?php $hide_show_nav_menu_btn = get_theme_mod('hide_show_nav_menu_btn','1');
$menu_btn_label = get_theme_mod('menu_btn_label');
$menu_btn_link = get_theme_mod('menu_btn_link');
$menu_btn_target = get_theme_mod('menu_btn_target','1');
if($hide_show_nav_menu_btn == '1') { if($menu_btn_label) { ?>
<a <?php if($menu_btn_target == '1') { ?> target ="_blank" <?php } ?> href="<?php echo esc_url($menu_btn_link); ?>" class="btn btn-theme"><?php echo esc_html($menu_btn_label); ?></a>
<?php } } ?>
</div>
</div>
</nav>
</div>
<!--/main Menu Area-->
</header> |
|
css | CSS | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
| /*
Theme Name: Financey
Theme URI: https://themeansar.com/free-themes/financey/
Author: themeansar
Author URI: https://themeansar.com
Template: agencyup
Description: Financey WordPress theme ideal for a business or perfect solutions for corporate, consulting, wedding planners, agency, law firms, finance, law travel, recipes, sport/medical shops, startups, online agencies, portfolios, freelancers, E-commerce. The theme is responsive, WPML, Retina ready, SEO friendly (Live preview : https://demos.themeansar.com/agencyup/transparent/)
Version: 0.4
Tested up to: 5.7
Requires PHP: 7.0
Tags: two-columns, three-columns, left-sidebar, right-sidebar, translation-ready, custom-background, custom-logo, featured-images, footer-widgets, full-width-template, blog, e-commerce, entertainment
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl.html
Text Domain: financey
*/
.bs-head-detail .info_widget {
display: flex;
font-size: 13px;
}
.bs-head-detail .info_widget i {
display: inline-flex;
position: relative;
margin-right: 5px;
font-size: 22px;
margin-top: 4px;
}
.bs-head-detail .info_widget strong {
display: flex;
margin-bottom: -5px;
}
.bs-head-detail.two {
padding-top: 20px;
padding-bottom: 20px;
}
.bs-head-detail.two .info-right li {
margin-right: 30px;
}
.bs-head-detail.two .info-right li:last-child {
margin-right: unset;
}
.bs-head-detail.two::after {
display: none;
}
.slide-caption {
background: rgba(0,0,0,0.8);
padding: 20px;
border-radius: 0;
}
.btn:hover, .btn:focus {
text-decoration: underline;
}
.bs-breadcrumb-section
{
box-shadow: unset;
}
.post-items ul:not(.post-categories) li a,.post-items ol:not(.post-categories) li a, .post-items table a, strong a, blockquote a, code a, p a, span:not(.author-name):not(.comments-link):not(.posted-on):not(.post-list) a, .navigation.posts-navigation .nav-links a:hover,
.navigation.posts-navigation .nav-links a:hover, #cancel-comment-reply-link, .comment-reply-link {
text-decoration: underline;
}
.site-title a:focus {
color: #fff;
outline: 1px dotted #fff;
}
a:focus {
outline: 1px dotted;
}
.bs-widget ul {
margin: 0;
}
.bs-sidebar .bs-widget h6 {
margin-bottom: 15px;
} |
|
function.php
| PHP | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
| <?php
/**
* Theme functions and definitions
*
* @package Financey
*/
if ( ! function_exists( 'financey_enqueue_styles' ) ) :
/**
* Load assets.
*
* @since 1.0.0
*/
function financey_enqueue_styles() {
wp_enqueue_style( 'agencyup-style-parent', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'financey-style', get_stylesheet_directory_uri() . '/style.css', array( 'agencyup-style-parent' ), '1.0' );
wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.css');
wp_enqueue_style( 'financey-default-css', get_stylesheet_directory_uri()."/css/colors/default.css" );
wp_dequeue_style( 'default',get_template_directory_uri() .'/css/colors/default.css');
}
endif;
add_action( 'wp_enqueue_scripts', 'financey_enqueue_styles', 99 );
function financey_customizer_rid_values($wp_customize) {
$wp_customize->remove_section('nav_btn_section');
$wp_customize->remove_section('hide_show_nav_menu_btn');
$wp_customize->remove_section('menu_btn_label');
}
add_action( 'customize_register', 'financey_customizer_rid_values', 1000 );
/*редирект с wp-admin*/
add_action( 'init', 'blockusers_init' );
function blockusers_init() {
if ( is_admin() && ! current_user_can( 'administrator' ) &&
! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
wp_redirect( home_url() );
exit;
}
}
/*редирект с wp-login.php*/
function redirect_login_page() {
$page_viewed = basename($_SERVER['REQUEST_URI']);
if( $page_viewed == "wp-login.php?pass=1" ) {
wp_redirect( home_url() );
exit;
}
}
add_action('init','redirect_login_page');
/*редирект после выхода из админ панели*/
function logout_page() {
$login_page = home_url( 'wp-admin' );
wp_redirect( $login_page . "?loggedout=true" );
exit;
}
add_action('wp_logout','logout_page');
add_filter( 'woocommerce_background_image_regeneration', '__return_false' ); |
|
0
|