elfinlay
Forum Replies Created
-
Andrew, thanks so much! That worked like a charm.
Can’t say how much I appreciate it.
Very best,
Emily.
Hello Konstantin and all.
Sorry to come back again with this. I still can’t seem to get the image to stretch to fit the page (http://trial.aulla.com.au)
I have added a style.css to the child directory, and added a modified in/custom-header.php to the child directory also. The contents of it are below.
But the image still remains the same size with the margins. Is there something I’m missing. Happy to provide more info if needed – and very grateful for any help!
<?php
/**
* Custom Header
*/function expound_custom_header_setup() {
/**
* Custom Header support
*/
add_theme_support( ‘custom-header’, array(
‘default-text-color’ => ‘3a3a3a’,
‘width’ => 100%,
‘height’ => 160px,
‘flex-height’ => true,
‘wp-head-callback’ => ‘expound_header_style’,
‘admin-head-callback’ => ‘expound_admin_header_style’,
) );
}
add_action( ‘after_setup_theme’, ‘expound_custom_header_setup’ );if ( ! function_exists( ‘expound_admin_header_style’ ) ) :
function expound_admin_header_style() {
?>
<style type=”text/css”>
#headimg {
background-position: 50% 0;
}
#headimg h1 {
margin-top: 50px;
margin-left: 0px;
margin-bottom: 0;
margin-right: 0px;
font-size: 34px;
line-height: 34px;
font-family: Georgia, “Times New Roman”, serif;
font-weight: 300;
}
#headimg h1 a {
text-decoration: none;
color: #3a3a3a;
display: block;
}
#headimg h1 a:hover {
color: #117bb8;
}
#headimg #desc {
font: 13px/20px “Helvetica Neue”, Helvetica, Arial, sans-serif;
font-weight: 300;
color: #878787;
margin-left: 40px;
}
</style>
<?php
}
endif;if ( ! function_exists( ‘expound_header_style’ ) ) :
function expound_header_style() {
$color = get_header_textcolor();
$default_color = get_theme_support( ‘custom-header’, ‘default-text-color’ );
$header_image = get_header_image();/*<?php if ( ! empty( $header_image ) ) : ?>
” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”>
<img src=”<?php header_image(); ?>” width=”<?php echo get_custom_header()->width; ?>” height=”<?php echo get_custom_header()->height; ?>” alt=”” />
<?php endif; ?>*/if ( $color == $default_color && empty( $header_image ) )
return;
?>
<style type=”text/css”>
<?php if ( ‘blank’ == $color ) : ?>
.site-title,
.site-description {
position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
}<?php if ( empty( $header_image ) ) : // blank *and* no header image ?>
.site-header .site-branding {
min-height: 0;
height: 0;
height: 0;
}
<?php endif; ?><?php else : // not blank ?>
.site-title a,
.site-title a:hover,
.site-description {
color: #<?php echo $color; ?>;
}
<?php endif; ?><?php if ( ! empty( $header_image ) ) : ?>
.site-header .site-branding {
background-color: transparent;
background-image: url(‘<?php echo esc_url( $header_image ); ?>’);
background-position: 50% 0;
background-repeat: no-repeat;
height: <?php echo absint( get_custom_header()->height ); ?>px;
}
<?php endif; ?>
</style>
<?php
}
endif;Thanks so much, Konstantin! That’s really helpful. Much appreciated!
Hi Andrew,
My apologies for the late reply – I’ve been away from my computer. The Diffchecker looks very helpful. Many thanks.
The image URL I’m actually using is:
http://trial.aulla.com.au/wp-content/themes/expound/images/AULLA-header.jpg
The CSS is:
background: url(‘http://trial.aulla.com.au/wp-content/themes/expound/images/AULLA-header.jpg’) 0 0 no-repeat;
My apologies. I typed “image.jpg” in a hurry when I was asking the question, but the AULLA-header.jpg link that is actually in the CSS code appears to be working fine. It’s just not appearing on the site.
Thanks again.
Hi Andrew,
Just the css at this stage, and not many changes at that – I’m really trying to find my way around.
Thanks for the tip about the updates. I will look into how to get around this. I presume I need to use the CSS Manager?
Yes (though I’ve been modifying the file on my desktop and uploading it using an ftp client).
There is a “Custom CSS Manager” which simply has the following in a box:
entry-header .entry-meta { display: none; }
I’m very new to WordPress – and so very much appreciate your help, Andrew.
Many thanks,
Emily.
Thanks very much, Andrew!
I have just tried this, but it doesn’t seem to make a difference. I think the problem is that the header background is just not appearing at all (trial.aulla.com.au) – so the background settings aren’t mattering at this stage. When I remove the header image using “custom header”, the header area vanishes altogether, and my background isn’t visible there at all – which makes me wonder if I’m editing the right div… (“site-title”)
I have set the “site-title” width to 100% and height to 154px. But the block does not appear. I’m sure I’m missing something very simple, but I can’t think what.
Thanks again for such a prompt reply, though. Really appreciated.