- This topic has 26 replies, 5 voices, and was last updated 8 years, 4 months ago by
Tom.
-
AuthorPosts
-
March 30, 2015 at 7:52 am #93312
Joe
Hi, i would like to put the logo before the site title at left hand side, the logo shown below the title, how to fix that? thanks
March 30, 2015 at 8:55 pm #93547Tom
Lead DeveloperLead DeveloperHi there,
Sorry for not getting back to you sooner.
I need to make some changes in the header file to allow people to sort which element should come first between the header widget, site title/tagline and logo. Will be looking to do this ASAP.
Do you possibly have the GP Hooks add-on? If so, I can give you some simple code to use in there to display the logo to the left of the title.
If not, I can give you a little more code which you can add to your child theme which will accomplish this.
Let me know π
March 31, 2015 at 5:46 am #93716Joe
Hi Tom,
I do not have GP Hooks add on, I would appreciate if you can let me have the code so I can paste into the functions.php or style.css of the child theme.
Thanks
March 31, 2015 at 11:05 pm #94017Tom
Lead DeveloperLead DeveloperHere we go:
1. Go to “Appearance > Customize > Header Content” and remove your logo.
2. Paste this into your child theme’s functions.php file:
add_action('generate_before_header_content','generate_insert_logo_before_header_content'); function generate_insert_logo_before_header_content() { ?> <div class="site-logo"> <img src="THE URL TO YOUR HEADER IMAGE" alt="Your site title" /> </div> <?php }
3. Add this CSS:
.site-logo { float: left; }
That should do it π
April 1, 2015 at 5:19 am #94233Joe
Hi Tom,
Thanks, your code works, and i have replaced your CSS with this:
.site-logo, .site-branding { display: inline-block; vertical-align: middle; }
April 1, 2015 at 10:25 am #94317Tom
Lead DeveloperLead DeveloperPerfect π
April 7, 2015 at 5:19 am #96355Tony
Hi Tom.
Re: http://generatepress.com/forums/topic/position-of-the-header-logo/#post-93547
Please could you provide the code to use within GP Hooks to position a logo to the left of the site title? It would also be helpful to know the correct place this code should be added to.
April 7, 2015 at 8:36 am #96388Tom
Lead DeveloperLead DeveloperHi Tony,
The code is just right above with step by step instructions: http://generatepress.com/forums/topic/position-of-the-header-logo/#post-94017
Let me know π
April 7, 2015 at 10:00 am #96446Tony
Thanks Tom, but I was under the impression the code snippets you gave to Joe were because he didn’t have the GP Hooks add-on. I do, however, have that add-on enabled so wondered where such code should be placed and what it should be. I should also add I’m not using a child theme.
April 7, 2015 at 2:49 pm #96597Tony
Sorry Tom, but this isn’t resolved.
In my last post I was trying to say that I thought the code snippets you gave to Joe were only to be used because he hadn’t got GP Hooks. Is there some other code that needs/should be added to GP Hooks and, if so, where?
Apologies if you misunderstood what I meant.
April 7, 2015 at 2:57 pm #96598Tom
Lead DeveloperLead DeveloperMy mistake!
You can follow the directions above, but instead of #2 you can add the below to the “Before Header Content” hook in GP Hooks:
<div class="site-logo"> <img src="THE URL TO YOUR HEADER IMAGE" alt="Your site title" /> </div>
Then you’ll want to add the same CSS as above.
April 7, 2015 at 3:26 pm #96606Tony
Thank you Tom. That works really well.
By the way, I had to set up the child theme so that was new to me. I’m still learning. Thankfully, the WP site isn’t live yet while I set it up properly.
Once again, thanks for your help. π
April 7, 2015 at 5:00 pm #96615Tom
Lead DeveloperLead DeveloperYou’re welcome! π
April 9, 2015 at 9:19 pm #97116elguavas
i’ve done this manually using gp hooks as detailed above. is there any update on when sortable header items will be available, as you’ve outlined tom in your first reply above?
April 9, 2015 at 11:50 pm #97137Tom
Lead DeveloperLead DeveloperNot yet, been focusing on our new add-on coming out and getting updates out for the rest of the add-ons.
Once all of that is sorted out, I’ll be looking into the above π
-
AuthorPosts
- You must be logged in to reply to this topic.