How to remove the header-image in Attachment Page
-
Does anyone know how to remove the large ‘header-image’ on the Attachment Pages on the Matheson theme?
When I click on a gallery image it opens in a new page (fine). But the standard large header-image is the first thing you see. I’d like to remove the large header image on attachment pages.
Thanks in advance.
Joel
-
Hello,
Did you find out how to do this? I want this as well!
Thanks!
Hi, there have been quite a few enquiries about the header function in this theme and although some of them are marked [resolved] the problem clearly still persists and the fix has not been applied as the developer promised some months ago. I have downloaded the theme this week (some five months after the initial questions about this) and I am still experiencing the same problem, namely I can not get the header image to change with every post (even though the function is available when creating the post) [Custom Header Image: Set Image] The header keep on defaulting to the first post custom header image that was set originally. Can this be change per post or not? Can we have an update about this, or should I change to another theme? Thank you.
Hi Leigh,
I have managed to change the header image on each page here https://www.sippingti.com
However, I did it months ago and can’t fully remember how. I did go into the css files and altered something in header file. If I remember right, most chnges I’ve made to the template were simply removing parts of code and then using the custom-image feature.
Google for results. I don’t have time today to check into it but maybe tomorrow.
—
As for the gallery header problem I found no way around removing the header for ‘just’ that page. Instead I installed a gallery plug-in and it served my purpose well enough.Sorry I can’t be more help.
Joel
Thank you Joel for your reply. Unfortunately I am not a programmer by any stretch of the imagination, so unless I have row by row instructions on how to change CSS files, I will not be able to do so. You however got right exactly what I would like to achieve (different header for every post) – wish you can remember exactly how you did it? The Developer should really pay attention to this, as we are not the only ones struggling with this issue, and someone with no coding experience is totally lost. I tried a plugin yesterday but even that did not work either. Anyone with any other suggestions for a workaround for this problem? I think others would love to get an answer to this issue too!
Hi Leigh,
I’ve just been tinkering around in the .php files to see what I did but actually it’s more simple than that. I wanted to remove the sidebar so I ripped them out of the .php files.
However to achieve the different header on each page issue I’ve simply used the feature that is in the page section. (where you create new pages./posts)
Set Custom Header ImageAs for the gallery plug-in I’m using NextGEN Gallery by Photocrati
(the gallery feature on the template was not really effective)Sorry but I’m not sure why that’s not working for you. Can I see your site?
Or email me privately and I can maybe look through your setup?I think that’s exactly the problem – the feature in the page section where you create posts somehow does not work? I have tried to install other plugins which changes the header for each post but none of them work either. This is the code in my theme functions php:
/**
* Display either the custom image or default header image
*
* @since 1.0.0
*/
function header_images() {
$custom_image = ( is_singular() ) ? get_post_meta( get_the_ID(), ‘matheson_custom_image’, true ) : ”;if ( is_singular() && ( ! empty( $custom_image ) || has_post_thumbnail() ) ) {
if ( $custom_image )
echo ‘<img src=”‘ . esc_url( $custom_image ) . ‘” alt=”” class=”header-img” />’;
else
the_post_thumbnail( ‘full’, array( ‘class’ => ‘header-img’ ) );
} else {
$header_image = get_header_image();
if ( ! empty( $header_image ) ) :
?>
<img class=”header-img” src=”<?php header_image(); ?>” width=”<?php echo get_custom_header()->width; ?>” height=”<?php echo get_custom_header()->height; ?>” alt=”” />
<?php
endif;
}
}What happens is that it changes for the first post I do, and then it simply defaults to that first posts image all the time – it does not change for post 2, or 3 etc.
As a complete novice this has been so frustrating for me! I so appreciate your help so far!If you could maybe check that code against yours to see where the bug is then I would be able to change to the correct coding in the appearance editor? If thats even possible? I think its a bug in the coding because the built in function clearly does not work properly.
Alternatively how would I change the header image per post in the css files – that seems to be what a number of people did originally? If I use a css editor it only seem to be able to change the post as you create it, not the header which is part of the theme functions. Logic tells me I would have to find the post id and change css per post id but I have NO idea how to do that!!?? Help?
Are you hosting your own site or using wordpress free domain?
Is your site live for me to look at online? We seem to miss each other by nearly 20 hours. I’m online now for a while if you respond.
I think the function will work fine it’s something simple not being done. Are you also using the ‘featured image’ part?
Joel
Yes I am hosting my own site and its currently not live. I was trying out the Matheson theme with an eye on upgrading – but this glitch and the lack of solved responses has put me off this developer completely. I am in a different country from you, I think that explains the 20hr time difference! LOL I will let you know as soon as I am ready to post it live. And yes I am using the “featured image” part too, and that works perfectly. Do you think there is a conflict maybe?
- The topic ‘How to remove the header-image in Attachment Page’ is closed to new replies.