嗨,我想知道是否有人可以帮忙。
我正在使用JointsWP Foundation 6主题创建一个网站,并创建了一个新的固定侧菜单,其中包括徽标和社交链接。我的问题是,每次用户点击它重新加载的菜单时,都会导致移位-有没有办法阻止这种情况-是页面加载问题还是我的方式不对?我尝试添加一个缓存插件,但似乎没有帮助。感谢您的任何建议。
以下是我的代码示例:
<body <?php body_class(); ?>>
<div class="off-canvas-wrapper">
<?php get_template_part( \'parts/content\', \'offcanvas\' ); ?>
<div class="off-canvas-content" data-off-canvas-content>
<header class="header show-for-small-only" role="banner">
<!-- This navs will be applied to the topbar, above all content
To see additional nav styles, visit the /parts directory -->
<?php get_template_part( \'parts/nav\', \'offcanvas-topbar\' ); ?>
</header> <!-- end .header -->
<!-- THE NEXT PART HAS BEEN MOVED FROM THE TOP OF THE PAGE.PHP -->
<div id="content">
<div id="inner-content" class="row expanded">
<div class="medium-3 columns show-for-medium" data-sticky-container>
<div class="sticky" data-sticky data-margin-top="0">
<!-- LOGO HERE -->
<div class="row logo">
<div class="medium-10 columns">
<img src="<?php echo get_site_url(); ?>/wp-content/themes/JointsWP-CSS-master/assets/images/logo.png" alt="big green space"/>
</div>
</div>
<div class="row verticalMenu">
<!-- VERTICAL MENU HERE -->
<?php joints_top_nav(); ?>
</div>
<div class="row socialR">
<p>
<i class="fa fa-facebook-square" aria-hidden="true"></i><i class="fa fa-linkedin-square" aria-hidden="true"></i>
<br/>
t: +44 000 000000<br/>
e: [email protected]</p>
</div>
</div>
</div>
和页面。php
<?php get_header(); ?>
<div id="inner-content" class="row">
<div class="medium-4 columns show-for-medium"> -->
<!-- LOGO HERE -->
<!-- VERTICAL MENU HERE -->
<!-- </div> -->
<main id="main" class="large-9 medium-9 columns contentSection" role="main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php get_template_part( \'parts/loop\', \'page\' ); ?>
<?php endwhile; endif; ?>
<!--</main> <!-- end #main -->
<!--</div> <!-- end #inner-content -->
<!--</div> <!-- end #content -->
编辑:
我已经添加了2个测试页面,以便您可以看到-biggreenspace。com/test-page-1,您将能够导航到测试页面2(其他菜单将带您进入维护屏幕)。这主要发生在Chrome和Firefox中,而不是IE edge中。