[Resolved] Tagline question – mobile and dynamic

Home Forums Support [Resolved] Tagline question – mobile and dynamic

Home Forums Support Tagline question – mobile and dynamic

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1473928
    Ash

    1. How do I show the tagline on the mobile header?

    2. I want to change the tagline only on certain pages.
    I found how to change the logo dynamically but couldn’t find a wat to change the tagline.

    #1474150
    David
    Staff
    Customer Support

    Hi there,

    as you’re wanting to have a variable tag lines the simplest way would be to Hook that into the Mobile Header.

    1. Create a new Hook Element

    2. Add this for your tagline content:

    <span class="mobile-tagline">Your tag line</span>

    3. Select the generate_inside_mobile_header hook
    4. Set your Display Rules

    5. Repeat the above for each different tagline and separate display rules.

    Then add this CSS to your site:

    .mobile-header-navigation .site-logo {
        margin-right: 10px !important;
    }
    .mobile-header-navigation .inside-navigation {
        justify-content: initial;
    }
    .mobile-tagline {
        margin-right: auto;
    }
    #1475023
    Ash

    Thank you.
    About dynamic tagline, I want to change it not only on mobile but desktop as well.
    There is no hook to filter it?

    #1475438
    Tom
    Lead Developer
    Lead Developer

    You can use this filter:

    add_filter( 'option_blogdescription', function( $tagline ) {
        if ( is_home() ) {
            return 'custom tagline for blog';
        }
    
        return $tagline;
    } );
    #1477050
    Ash

    Thank you!

    #1477055
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

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