- This topic has 15 replies, 6 voices, and was last updated 7 years, 1 month ago by Leo.
-
AuthorPosts
-
March 26, 2016 at 1:38 pm #181929Stéphane Dupont
Hello,
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 DeveloperHmm, 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 DupontThank you.
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 DeveloperI’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 DupontThank you!
August 1, 2016 at 12:08 am #214423manda selvaI 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 selvaI 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 issue
August 1, 2016 at 10:18 am #214537TomLead DeveloperLead DeveloperI’m afraid the only way of doing this is through GP Hooks currently.
It is something I’m looking into though 🙂
August 1, 2016 at 1:55 pm #214586manda selvaTom,
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 post
August 1, 2016 at 11:22 pm #214681TomLead DeveloperLead Developerbut also removes the header
Can you link me to a page where this is happening?
August 3, 2016 at 5:52 pm #215396mandaTom,
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.
http://www.test.astromanda.com/moon-pluto-aspects-in-astrology/2. When I disabled the image post in this specific post using disable element, the header also disappears
http://www.test.astromanda.com/mars-uranus-aspects-astrology/Let me know if you have any suggestions to fix it.
August 4, 2016 at 12:04 am #215454TomLead DeveloperLead DeveloperI just answered this here: https://generatepress.com/forums/topic/when-image-post-is-disabled-in-single-post-header-disappears-too/#post-215453
Let me know 🙂
February 9, 2017 at 3:00 am #276491MargaHello,
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 SupportIt would be the same HTML as how you would add images to normal pages, like this:
<img src="URL TO PAGE" alt="" />
Hope this helps!
February 9, 2017 at 7:17 am #276587MargaAlright, thank you very much!!
-
AuthorPosts
- You must be logged in to reply to this topic.