- This topic has 15 replies, 6 voices, and was last updated 4 years ago by Leo.
March 26, 2016 at 1:38 pm #181929Stéphane Dupont
Happy user of a GeneratePress Premium here.
I was wondering if there’s a way to have the “Blog Page Header” displayed when in “single post view”?
I know I can create a page header for a post, but it’s tedious to do it for each one. Especially if I want the same header for all posts AND for the blog page.
Thank you for your answer,
Stéphane.March 26, 2016 at 4:13 pm #181942TomLead DeveloperLead Developer
Hmm, unfortunately I don’t think this is possible as all of the CSS the page header generates for the blog is told to only work on the main blog page.
You could however use GP Hooks to do it, you just don’t get any of the fancy controls.
For example, in the “After Header” hook:
<?php if ( is_single() ) : ?> <div class="page-header-content generate-page-header generate-content-header"> <div class="grid-container"> Your content goes in here </div> </div> <?php endif; ?>March 26, 2016 at 11:35 pm #181998Stéphane Dupont
Or would it be possible to have in a future version a “Post page header” section where we can set a default post page header that would be applied to every post, without having to set it each time?March 27, 2016 at 10:55 am #182049TomLead DeveloperLead Developer
I’m not sure that would be an option as it could cause some confusion.
However, I’ll see what I can do about making a PHP filter to allow the blog page header to apply to other templates.March 27, 2016 at 12:31 pm #182079Stéphane Dupont
Thank you!August 1, 2016 at 12:08 am #214423manda selva
I am having the same problem – I need the same header as in main page also show up in all pages,and in single posts. other than adding this through the gp hook, is there any add on that may help. Are you going to be “http://www.test.astromanda.com/wp-content/uploads/2016/07/astromandaheaderlogogp-1800.jpg”August 1, 2016 at 12:10 am #214424manda selva
I am having the same problem – I need the same headerin main page to show up in all pages andsingle posts. Other than adding this through the hook, is there any add-on that may help. Are you going to be adding a php filer to remedy this issueAugust 1, 2016 at 10:18 am #214537TomLead DeveloperLead DeveloperAugust 1, 2016 at 1:55 pm #214586manda selva
When I add the image through gp hook using “if single …” php code, the header shows up in all single post. However, there is another issue, where the featured image shows up right on top of the title for every post. It looks really awkward since this image is there inside he content anyway. So I used the disable elements in each post to remove the post image/header and this removes the post image on top of title like I wanted, but also removes the header. So the only solution go each post and add the header (page header option). This doesn’t sound like an effective method. If I have 1000 single posts, it is going to be difficult to add the same header in for each postAugust 1, 2016 at 11:22 pm #214681TomLead DeveloperLead DeveloperAugust 3, 2016 at 5:52 pm #215396manda
thanks so much I was able to add the header to all single posts using GP hook. To illustrate the problem with the post header and featured image, I have 2 link
1. you will see both the header and the featured image right above the single post.
2. When I disabled the image post in this specific post using disable element, the header also disappears
Let me know if you have any suggestions to fix it.August 4, 2016 at 12:04 am #215454TomLead DeveloperLead Developer
Let me know 🙂February 9, 2017 at 3:00 am #276491Marga
So still now the only way to show the same header in single posts than in blog page is adding that hook? I want to show the same image header always. What should I add in “your content goes in here” to show a image? Thanks!
<?php if ( is_single() ) : ?>Your content goes in here
<?php endif; ?>February 9, 2017 at 6:02 am #276547LeoStaffCustomer SupportFebruary 9, 2017 at 7:17 am #276587Marga
Alright, thank you very much!!
- You must be logged in to reply to this topic.