css 向Genesis childtheme Dynamik添加自定义标头支持以及插件“Unique Headers”以在diffe上添加不同的标题图像

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 向Genesis childtheme Dynamik添加自定义标头支持以及插件“Unique Headers”以在diffe上添加不同的标题图像相关的知识,希望对你有一定的参考价值。

<?php
//don't add the opening php tag in Dynamik Functions, only copy from the following lines

// As long as you use background-size:cover in your CSS, the sizes don´t matter that much, but the pic should be large enough and optimized 
// You can edit the args if needed.
add_theme_support( 'genesis-custom-header', array( 'width' => 980, 'height' => 400, 'flex-width' => true, 'header-selector' => '.site-header') );

/** 
 *
 * Add Body Class 'header-image' if 'genesis_custom_header'
 * exists and image logo setting in Customizer or Theme Settings
 *
 */
//* Add custom body class to the head
if ( genesis_get_option('blog_title') == 'image' && function_exists( 'genesis_custom_header' ) ) {
	add_filter( 'body_class', 'sp_body_class' );
	function sp_body_class( $classes ) {	
	$classes[] = 'header-image';
	return $classes;
	
	}
}
.custom-header .site-header { 
	background-color: transparent;  
	background-repeat: no-repeat; 
	background-attachment: fixed; 
	background-position: center center;
	-o-background-size: cover!important; 
	-moz-background-size: cover!important; 
	-webkit-background-size: cover!important;  
	background-size: cover!important;
}

以上是关于css 向Genesis childtheme Dynamik添加自定义标头支持以及插件“Unique Headers”以在diffe上添加不同的标题图像的主要内容,如果未能解决你的问题,请参考以下文章

css Genesis示例CSS重置

css 将CSS 3动画添加到您的Genesis主题

css 将CSS 3动画添加到您的Genesis主题

css 将CSS 3动画添加到您的Genesis主题

css 用锚链接修复标题重叠(Genesis)

css Genesis样式表标题。