[英]Wordpress Header Background Image Issue
经过数小时的尝试,尝试了一些不同的东西和代码,我来到这里寻求帮助(我是编码的初学者)。
我只想在标题中放入全宽和全高背景图片。 该站点位于: http : //www.coveragenewstv.com/
这是header.php:
<head>
<title><?php wp_title('|', true, 'right'); ?></title>
<meta charset="<?php bloginfo( 'charset' );?>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
wp_head(); /** we hook up in wp_booster @see td_wp_booster_functions::hook_wp_head */
?>
</head>
<body <?php body_class() ?> itemscope="itemscope" itemtype="<?php echo td_global::$http_or_https?>://schema.org/WebPage">
<?php //this is closing in the footer.php file ?>
<?php /* scroll to top */?>
<div class="td-scroll-up"><i class="td-icon-menu-up"></i></div>
<div id="td-outer-wrap">
<div class="td-transition-content-and-menu td-mobile-nav-wrap">
<?php locate_template('parts/menu-mobile.php', true);?>
</div>
<?php //this is closing in the footer.php file ?>
<div class="td-transition-content-and-menu td-content-wrap">
<?php
td_api_header_style::_helper_show_header();
do_action('td_wp_booster_after_header'); //used by unique articles
在CSS文件的底部添加两个代码块:
.td-banner-wrap-full, .td-header-menu-wrap-full {
background-color: transparent;
}
和
.td-header-wrap.td-header-style-1 {
background-image: url(http://www.joomlaworks.net/images/demos/galleries/abstract/7.jpg);
background-size: cover;
}
将网址替换为您的背景图片网址。
请确保更改header.php中的任何内容都没有意义。 header.php不属于站点标题,它更像是wordpress的配置。
如果您想更改Header-Background,只需在您的wordpress管理部分中进行更改即可。
您可以在下面找到管理部分
您到了管理栏中的“我的网站”,然后单击“自定义”。 需要有一个称为“标题图像部分”的部分。 您需要上传背景,这样应该可以正常工作。
太好了,Traxstar!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.