• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Two line H1 title in single post

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › General Genesis Framework Discussions › Two line H1 title in single post

This topic is: not resolved

Tagged: h1, posts, single post, template

  • This topic has 5 replies, 3 voices, and was last updated 2 years ago by Anita.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • May 25, 2021 at 3:41 am #504110
    RussCW
    Participant

    Theme: Magazine Pro

    I've found some code which would allow me to add a 2 line H1 title in blog posts. The code looks like this...

    <?php echo str_replace(' | ', '<br />', get_the_title()); ?>

    This would allow me to add a pipe where I'd like to split the title. My problem is I'm not sure which template to edit. Any ideas?

    May 25, 2021 at 3:10 pm #504121
    tsrojal
    Participant

    I think that two H1 tags are not recommended (SEO issue)


    Pranje tepiha Novi Beograd

    May 26, 2021 at 2:11 am #504130
    RussCW
    Participant

    Thanks but I realise that. I don't want to use 2 H1 tags that's the point. I've actually solved the problem anyway. The solution was to use <span> in the title to split onto 2 lines so...

    First part of title <span style="display:block"> second part of title</span>

    May 26, 2021 at 6:40 pm #504132
    Anita
    Keymaster

    You can do that already without that code. I did it in a demo and it worked just fine.


    Love coffee, chocolate and my Bella!

    May 27, 2021 at 2:07 am #504135
    RussCW
    Participant

    Hi Anita
    So I ca do it without the <span style="display:block">?

    May 27, 2021 at 10:16 am #504139
    Anita
    Keymaster

    Yes, just add the pipe bar and then <br /> before the first letter of the next word you want to display on the next line.


    Love coffee, chocolate and my Bella!

    May 28, 2021 at 2:09 am #504144
    RussCW
    Participant

    Ah OK thanks.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Log In

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble