Blog page header in "single post view"

Home Forums Support Blog page header in "single post view"

Home Forums Support Blog page header in "single post view"

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #181929
    Sté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.

    #181942
    Tom
    Lead Developer
    Lead 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; ?>
    #181998
    Stéphane Dupont

    Thank 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?

    #182049
    Tom
    Lead Developer
    Lead 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.

    #182079
    Stéphane Dupont

    Thank you!

    #214423
    manda 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&#8221;

    #214424
    manda 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 issue

    #214537
    Tom
    Lead Developer
    Lead Developer

    I’m afraid the only way of doing this is through GP Hooks currently.

    It is something I’m looking into though 🙂

    #214586
    manda selva

    Tom,

    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

    #214681
    Tom
    Lead Developer
    Lead Developer

    but also removes the header

    Can you link me to a page where this is happening?

    #215396
    manda

    Tom,

    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.

    #215454
    Tom
    Lead Developer
    Lead Developer
    #276491
    Marga

    Hello,

    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; ?>

    #276547
    Leo
    Staff
    Customer Support

    It 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!

    #276587
    Marga

    Alright, thank you very much!!

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.