Archived topic
Position of the header logo
26 replies · Started by Anonymous on March 30, 2015
cool on all counts! ;-)
is there any chance for update on sortable header items, as you’ve Tom in your first reply above? sorry for pushing ;)
Have a couple things to get released first, but this is high on my list :)
As of 1.2.9.7, we'll be able to add a function to our child themes and adjust the order of the header items.
For example: https://gist.github.com/generatepress/d58dd082dbd741943aee
You would pop that function into your child theme, and then rearrange the items to your liking.
Again, this won't work until 1.2.9.7 is live.
Hi Tom! :)
Firstly, I'm very happy with my purchase of GP Premium, as it seems to do everything that I need, with the possibility of adding a few other things that I'd like..
I tried the suggestions above but I couldn't get it to work.
Now that 1.2.9.8 is out I wonder if you'd be kind enough to detail how I add this:
https://gist.github.com/generatepress/d58dd082dbd741943aee
and how I can the use it to move the logo position.
Thanks in anticipation.
Absolutely!
Add the entire function to your child theme's functions.php file, or another method shown at the link below.
How to add PHP: http://generatepress.com/knowledgebase/adding-php-functions/
You'll see the function is made up of three areas:
// Header widget
if ( is_active_sidebar('header') ) : ?>
<div class="header-widget">
<?php dynamic_sidebar( 'header' ); ?>
</div>
<?php endif;
// Site title and tagline
if ( empty( $generate_settings['hide_title'] ) || empty( $generate_settings['hide_tagline'] ) ) : ?>
<div class="site-branding">
<?php if ( empty( $generate_settings['hide_title'] ) ) : ?>
<p class="main-title" itemprop="headline"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php endif;
if ( empty( $generate_settings['hide_tagline'] ) ) : ?>
<p class="site-description"><?php bloginfo( 'description' ); ?></p>
<?php endif; ?>
</div>
<?php endif;
// Site logo
if ( !empty( $generate_settings['logo'] ) ) : ?>
<div class="site-logo">
<a href="<?php echo apply_filters( 'generate_logo_href' , esc_url( home_url( '/' ) ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img class="header-image" src="<?php echo $generate_settings['logo']; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a>
</div>
<?php endif;
Simple re-arrange these blocks (keeping them intact, as shown above), and you're good to go!
Thanks Tom!
Do I just copy and paste it after this:-
<?php
/**
* Generate child theme functions and definitions
*
* @package Generate
*/
which is the only text showing when I select the php option in "Editor"?
You got it :)
Be sure to paste the entire function: https://gist.github.com/generatepress/d58dd082dbd741943aee
Then re-arrange as needed.
That's brilliant, I've managed to move the logo above the site title and tagline without crashing the site but I'd like it positioned to the left of the site title and tagline.
Sorry for the additional workload Tom.
This CSS from earlier in the thread should do it: http://generatepress.com/forums/topic/position-of-the-header-logo/#post-94233
Thanks again Tom!
It works perfectly.
Very much appreciated!
Awesome! Happy to help :)