我最近尝试更改网站的header.php文件,以便为我的网站添加点击通话按钮。我成功添加了按钮,但是当您单击它时,它将与侧边栏小部件重叠。我尝试将代码放回原来的样子,但随后侧边栏开始显示在我主页上的内容底部。这是标题代码:
<?php // Read functions.php for CSS and JS inclusion ?>
<?php
header('X-Frame-Options: GOFORIT');
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="utf-8">
<title>
<?php
global $page, $paged;
wp_title( '|', true, 'right' );
bloginfo( 'name' );
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";
if ( $paged >= 2 || $page >= 2 )
echo ' | ' . sprintf( __( 'Page %s', 'qantumpro' ), max( $paged, $page ) );
?>
</title>
<?php
// facebook metadata
if (is_single()){
echo createMetadata($post->ID); //in frontend_functions.php only for single not archive
}
?>
<?php
$favicon = get_option( THEME_SHORTNAME . '_favicon');
if($favicon != ''){
?>
<link rel="shortcut icon" href="<?php echo $favicon; ?>" type="image/x-icon" />
<?php } ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php get_template_part( 'part', 'tracking' ); ?>
<?php get_template_part( 'part', 'custom_styles' ); ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php get_template_part( 'part', 'facebooksdk' ); ?>
<?php
$layoutStyle = get_option(THEME_SHORTNAME.'_boxed_layout');
if(get_option(THEME_SHORTNAME."_demopanel")=='show' && isset($_COOKIE['cookie'.THEME_SHORTNAME.'_boxed_layout'])){
if($_COOKIE['cookie'.THEME_SHORTNAME.'_boxed_layout'] != 'Default'){
$layoutStyle = $_COOKIE['cookie'.THEME_SHORTNAME.'_boxed_layout'];
}
}
if($layoutStyle== 'Unboxed' || $layoutStyle == '' || $layoutStyle == false){
if(current_user_can('manage_options') || get_option(THEME_SHORTNAME.'_underconstruction_enable')!= 'enable'){
get_template_part( 'part', 'topmenu' );
} ?>
<div class="qw-topspacer hidden-phone hidden-tablet"></div>
<?php
}
?>
<div class="container contentwrapper qw-totalwrapper" id="main_container">
<?php
if(get_option(THEME_SHORTNAME.'_underconstruction_enable') == 'enable'){
if ( current_user_can('manage_options')) {
$alertbox = '<div class="alert alert-error">
<h1>Attention: the "Coming Soon" page is enabled! Only administrators can see the website!!! </h1>
<p>Change it in wpadmin > Appearance > QantumThemes Admin Panel > Coming Soon Page</p>
</div>';
echo $alertbox;
}else{
get_template_part('part','underconstruction');
}
}
?>
<?php get_template_part( 'part', 'logobar' ); ?>
<?php
if($layoutStyle== 'Boxed'){
get_template_part( 'part', 'topmenuboxed' );
}
?>
<?php get_template_part( 'part', 'breadcrumb' ); ?>
<?php
if( is_front_page() && !is_paged() ){
get_template_part( 'part', 'indexmodules' );
}
?>
除此之外,本文“class =”主页博客已登录admin-bar no-customize-support chrome do-etfw“&gt;”开始在我的网站顶部显示。请帮忙。感谢。