[Resolved] Upgraded – lost my logo

Home Forums Support Upgraded – lost my logo

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #191006
    morriscountynj

    On this site – http://mcscd.org/

    My site logo used to be to the left of the text of the header. When I upgraded,

    went away. Was there a change to the parent theme regarding the logo? How can I get the logo back?

    #191009
    morriscountynj

    Sorry, didn’t see how the post rendered. I meant

    <div class="site-logo">[[logo]]</div>

    went away

    #191061
    Tom
    Lead Developer
    Lead Developer

    This version of GP moved to using the new WordPress 4.5 custom logo (required by WordPress.org).

    The migration should have gone well (I tested it thoroughly).

    Do you have any custom functions added to the theme?

    #191070
    morriscountynj

    Ah why didn’t I think of that. I actually have a custom header.php on all of the sites, mainly to account for <noscript> navigation. Within the custom header.php is the <?php do_action( 'generate_before_header_content'); ?>, followed by this code:

    <?php   if ( !empty( $generate_settings['logo'] ) ) : ?>
    				<div class="site-logo">
    					<a href="<?php echo 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; ?>
    #191071
    Tom
    Lead Developer
    Lead Developer

    Instead of that code you could just have this now:

    generate_construct_logo();

    That should fix it πŸ™‚

    #191072
    morriscountynj

    This is followed by the title/tagline code.

    I made this custom header.php a couple of years ago so it looks like the parent theme version has changed considerably since then…

    #191073
    Tom
    Lead Developer
    Lead Developer

    There’s three different functions now for those elements:

    // Header widget
    generate_construct_header_widget();
    	
    // Site title and tagline
    generate_construct_site_title();
    	
    // Site logo
    generate_construct_logo();
    #191077
    morriscountynj

    Ok, the code now looks like

    <?php do_action( 'generate_before_header_content'); ?>
    <?php generate_construct_logo(); ?>

    and that works πŸ™‚

    #191078
    Tom
    Lead Developer
    Lead Developer
    #191079
    morriscountynj

    Question about the new functions:

    so I can replace

    <?php if ( is_active_sidebar('header') ) : ?>
    				<div class="header-widget">
    					<?php dynamic_sidebar( 'header' ); ?>
    				</div>
    			<?php endif; // end sidebar widget area ?>

    with

    generate_construct_header_widget();?

    It might not work for the way I have the title and tagline setup. I actually switched the location of them (tagline first, then main title, as opposed to vice versa).

    #191080
    Tom
    Lead Developer
    Lead Developer

    That’s correct. You can order those 3 functions however you like to have the elements show in different order.

    #191081
    morriscountynj

    Makes sense.

    Are there separate functions for the title and the tagline, or just the lumped-together generate_construct_site_title();?

    #191082
    Tom
    Lead Developer
    Lead Developer

    They’re both in that one function.

    #191084
    morriscountynj

    Makes sense. It looks like this works, just to show you:

     <?php generate_construct_logo(); ?>
                
                
    			<?php if ( empty( $generate_settings['hide_title'] ) || empty( $generate_settings['hide_tagline'] ) ) : ?>
    				<div class="site-branding">
                       <?php if ( empty( $generate_settings['hide_tagline'] ) ) : ?>
    					<p class="site-description"><?php bloginfo( 'description' ); ?></p>
    				<?php endif; ?>
                        
    				<?php if ( empty( $generate_settings['hide_title'] ) ) : ?>
    					<h1 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></h1>
    				<?php endif; ?>
    				
    		
    				
    				</div>
                
    			 <?php generate_construct_header_widget(); ?>
    #191086
    Tom
    Lead Developer
    Lead Developer

    Ah you put the tagline above the site title, got it.

    That looks good to me πŸ™‚

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