[Resolved] Blog post title customization

Home Forums Support [Resolved] Blog post title customization

Home Forums Support Blog post title customization

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1627307
    Antonio

    Hi all,

    on my site, blog post titles are displayed using merged header element.
    I would like to add a generate block wave background for that blog post titles header.

    Can I customize it with generate block (free version)? If so, could you explain me the correct process to do it?

    Thank you very much

    Antonio

    #1627390
    David
    Staff
    Customer Support

    Hi there,

    in the next update we will be introducing dynamic content for the Block Element, so you will be able to use that instead of the Header Element.

    To do it today is a little more tricky.
    1. Keep your current Header Element.
    2. Create a new Block Element with an empty Container Block that has a Transparent Background, and just the Shape Divider your want.
    3. Give the Container Block -> Advanced > Additional CSS Class(es) – a class of hero-divider
    4. Set the Hook to after_header with a priority of 50
    5. Set Display Rules to match your header element.

    This should output the Divider below the header element.

    Now for some CSS to move it over the top of the Header Element:

    .hero-divider {
        margin-top: -100px;
    }

    You will to adjust the 100px to match the height of the Shape container.
    May take a little tweaking.

    #1629398
    Antonio

    Thank you, David!
    Is it possible to set background wave color behind blog post title?

    #1629477
    David
    Staff
    Customer Support

    Hmmm… not using that method, as Z-Index is relative to its parent container. So The title can be in front of its own background but not a container that sits outside if it.

    Are you just wanting to display just the Post Title?

    If so you can use this PHP Snippet to create a shortcode:

    function post_title_shortcode(){
        return get_the_title();
    }
    add_shortcode('post_title','post_title_shortcode');

    Then you can build the entire thing in the Block editor with this shortcode: [post_title]

    Still keep your header element for merging only.

    The next version of GPP will have dynamic content built into the Block Editor 🙂

    #1629490
    Antonio

    Thank you!

    #1629776
    David
    Staff
    Customer Support

    You’re welcome

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