[Resolved] How to swap Logo and Title position?

Home Forums Support [Resolved] How to swap Logo and Title position?

Home Forums Support How to swap Logo and Title position?

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #199028
    Valerio

    Currently, I have:

    Title
    Slogan
    Logo

    but I’d like the logo to be on top of the rest.
    Couldn’t find the file handling this. How to do that?

    Thanks!

    #199075
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You can use this function: https://gist.github.com/generatepress/4cfa628cec96088dcbf8dd8cf399b83e

    Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

    Just re-arrange the functions in there πŸ™‚

    #199082
    Lisa

    Hi, I’m looking for a similar result so I hope it’s ok to use an existing thread (day 1 using GeneratePress and I’ve made more progress in a couple of hours than with the umpteen other themes I tried and couldn’t customize to my satisfaction!)…

    I’d like the logo to be between the title and the tagline:

    Site title
    Logo
    Tagline

    I would also like them all to be aligned to center – can that also be done in the same function?

    #199083
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    My answer above should work for you too πŸ™‚

    For the alignment, go to Customize – Layout and you’ll see header alignment and navigation alignment.

    Hope this helps!

    #199099
    Lisa

    Thanks, got the alignment sorted. But I’m after the logo going in between the title and tagline. Can I separate them in the code?

    Instead of:
    // Site title and tagline
    generate_construct_site_title();
    // Site logo
    generate_construct_logo();

    I tried this, but it’s definitely not right because it resulted in errors:

    // Site title
    generate_construct_site_title();
    // Site logo
    generate_construct_logo();
    // Site tagline
    generate_construct_tagline();

    #199103
    Valerio

    Thank you Tom!

    Let me tell you, excellent theme and support. Keep up the great work!

    Valerio

    #199192
    Tom
    Lead Developer
    Lead Developer

    Thanks, Valerio! πŸ™‚

    Lisa – the title and tagline are wrapped into the same function. In order to separate them, you would need to build your header using custom code in GP Hooks.

    You can disable the tagline in the Customizer, then add it to the “After Header Content” hook in GP Hooks like this:

    <p class="site-description">Your tagline here</p>

    #199256
    Lisa

    Thanks – I’ll have a look today. I’ve been meaning to take a look at GP Hooks!

    #199260
    Lisa

    Almost got it… it causes the logo to go slightly out of alignment (centered). Adding padding to the left causes it to be mis-aligned in mobile view.

    In ‘Layout’ I have header alignment set to center, and at the moment I also have CSS code to add the padding which makes it appear centered on desktop view.

    What am I missing?

    #199282
    Tom
    Lead Developer
    Lead Developer

    Hard to tell without actually seeing the site.

    Having a header widget in there can cause the center alignment to mess up.

    You can apply CSS to desktop only with this media query:

    @media (min-width: 769px) {
        /* CSS in here for desktop only */
    }
    #199306
    Lisa

    Ah, yes – it was a widget (social icons). I’m sure I can find somewhere else to put them instead of adding code.

    Thanks for your help (so far – I think I might have a couple more questions but will see how I go).

    Absolutely love GeneratePress and Add-ons!

    #199433
    Tom
    Lead Developer
    Lead Developer

    Glad I could help πŸ™‚

    #515343
    fedae

    I need to do the same swap logo and title position but I really don”t get where to use this function
    You can use this function: https://gist.github.com/generatepress/4cfa628cec96088dcbf8dd8cf399b83e

    it’s not cleae for me, in witch file ? I have tried in my child theme css, but it does’nt work, can you be more explicite for peopole like me ?
    Thanks

    #515713
    Leo
    Staff
    Customer Support

    Hi there,

    It’s a function/PHP so try this: https://docs.generatepress.com/article/adding-php/#use-a-child-theme

    #516156
    fedae

    I have seen it and I have a child theme but my question is very simple, in witch file do i copy theses lignes
    I understand that for professionals it is obvious, but having never done it I do not know or copy these lines

    if ( ! function_exists( ‘generate_header_items’ ) ) :
    /**
    * Build the header
    *
    * Wrapping this into a function allows us to customize the order
    *
    * @since 1.2.9.7
    */
    function generate_header_items()
    {
    // Header widget
    generate_construct_header_widget();

    // Site title and tagline
    generate_construct_site_title();

    // Site logo
    generate_construct_logo();
    }
    endif;

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