[Resolved] Add content title to hook

Home Forums Support [Resolved] Add content title to hook

Home Forums Support Add content title to hook

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #800585
    Ethan

    This feels like it should be so simple, but I just can’t figure it out.

    I am using a hook (after_header) to insert content after the header. I literally just want a band of color with the content title in the middle.

    I’ve figured out (I think) how to put the band of color. But how do I insert the Content Title into this hook area?

    #800601
    Leo
    Staff
    Customer Support

    Hi there,

    Would header element work for you?
    https://docs.generatepress.com/article/header-element-overview/

    Then you can just use the template tags:
    https://docs.generatepress.com/article/header-element-template-tags/

    Let me know ๐Ÿ™‚

    #800605
    Ethan

    Gah! Yes, thank you!

    What is the best way to set styling for the font size in this area?

    #800613
    Leo
    Staff
    Customer Support

    CSS is the only way.

    So if this is the page hero content: <h1>{{post_title}}</h1>, then the CSS would be:

    .page-hero h1 {
        font-size: 25px;
    }

    Check out some examples here as well:
    https://docs.generatepress.com/article/page-hero-examples/

    #801591
    Ethan

    Thank you!

    #801616
    Leo
    Staff
    Customer Support

    No problem ๐Ÿ™‚

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