I know what happened to the png file that went black .. it was oversized by a few pixels as I was trimming to place the graphic stratgegically, and thus WP converted it to a jpg file, as I found in the media library.
The rest is still a problem ..
@breezyohio,
I appreciate you using Oenology! Do you have a link to the live site, so I can see what’s happening?
Thanks!
Chip
here it is ..
http://xxxxx/~
It’s a temporary location for testing ..
Thanks for that!
This is a known issue, and will be fixed in version 2.5. (I had to submit a core patch to get it fixed properly, but I’ll have a workaround in Oenology in the meantime.)
Okay .. is there an edit I can do with header.php in the meantime? If it’s soon to be fixed I’ll just let it go as it will be a few days till live publish.
I’ll edit out that live link too if it’s okay with you ..
Here’s the simple fix.
Look in \functions\hooks.php, line 872:
function oenology_hook_site_header() {
$site_header = '';
// Displays the blog name, as defined on the General Settings page in the administration panel
$site_header .= '<div class="site-header-text">' . get_bloginfo( 'name' ) . '</div>';
// Displays the blog description, as defined on the General Settings page in the administration panel
$site_header .= '<p>' . get_bloginfo( 'description' ) . '</p>';
echo apply_filters( 'oenology_hook_site_header', $site_header );
}
The fix for this function is as follows:
function oenology_hook_site_header() {
$site_header = '';
$site_header_name = ( 'blank' != get_header_textcolor() ? get_bloginfo( 'name' ) : ' ' );
$site_header_description = ( 'blank' != get_header_textcolor() ? get_bloginfo( 'description' ) : ' ' );
// Displays the blog name, as defined on the General Settings page in the administration panel
$site_header .= '<div class="site-header-text">' . $site_header_name . '</div>';
// Displays the blog description, as defined on the General Settings page in the administration panel
$site_header .= '<p>' . $site_header_description . '</p>';
echo apply_filters( 'oenology_hook_site_header', $site_header );
}
If you want, just overwrite the function accordingly.
However, there is a safer way to do it: use the custom oenology_hook_site_header
filter. e.g. add this to the bottom of functions.php (or in a Child Theme):
function custom_oenology_site_header_filter( $site_header ) {
$site_header = ' '
return $site_header;
}
add_filter( 'oenology_hook_site_header', 'custom_oenology_site_header_filter' );
If that’s confusing, just use the first option, of overwriting the function with the new function code.
That last option would be for editing/adding code to functions.php .. would that be before the
?>
or after that line?
That is a closing PHP tag, so you’ll want to add PHP immediately before it.
Yep, thought so.
So when I do this I’m getting ..
Parse error: syntax error, unexpected T_RETURN in /home/jwhit/public_html/wp-content/themes/oenology/functions.php on line 132
line 132 on my file is ..
return $site_header;
Any thoughts?
Syntax error on my part. 🙂
Change this:
$site_header = ' '
…to this:
$site_header = ' ';
Yes, those darn syntax errors .. I understand 😉
Just a heads up though .. that did get rid of the text but also got rid of the header image as well
I should not post help when distracted. 🙂
Try this instead:
function custom_oenology_site_header_filter( $site_header ) {
$site_header = '';
$site_header .= '<div class="site-header-text"> </div>';
$site_header .= '<p> </p>';
return $site_header;
}
add_filter( 'oenology_hook_site_header', 'custom_oenology_site_header_filter' );
Chip
Yes, this stuff is too tricky to do when distracted by your day job, for sure.
results are ..
no text (no matter what is selected in the header settings)
there is still a grey overlay over the header image.
I’m not really sure where this grey is coming from. Thanks for giving it an effort and when you get it further down the road or if you want me to try something just reply to this thread. I’ll be happy to try it out.
The opaque overlay is added via CSS, via the oenology_header_style()
callback, defined in \functions\theme-setup.php
.
Specifically, on line 494:
#site-header-text {
background: rgba(0, 0, 0, 0.2);
}
This opacity is applied when a non-default header image is selected.
If you want to override it, you can again use a filter:
function custom_oenology_header_style() {
?>
<style type="text/css">
#site-header-text {
background: none;
}
</style>
<?php
}
// Use a priority of 99, to ensure this outputs last
add_action( 'wp_print_styles', 'custom_oenology_header_style', 99 );
(Untested, mainly because I don’t have access to test just at the moment…)
Would I add that function to the functions.php file as before?
just curious .. why would you ever want to add a shaded overlay to a non default header image or is that just some leftover code from something else?