• Why is it that the most easiest things in WP are made more difficult.

    I want a logo, like 99.9% of other blogs. How do I add a logo on this theme? I can see I can add a header (not what I want). I simply want to upload my logo and it replace the title and description text currently on the header.

    I really should not have to dig through code OR upload a plugin to complete a very basic task.

Viewing 6 replies - 16 through 21 (of 21 total)
  • I’m building a wordpress website using 2016 theme, my first one.
    I need to know how do I replace the web-title for a logo? This option should be included on the 2016 theme. Can anyone please send instructions on how to solve this issue.
    I’m not a master on codes, but if it will require coding, I will need detail steps on where to go and how to do it. Thanks.

    My temp site under construction is: https://88f.bcf.myftpupload.com

    Thank you,

    I have included my logo thanks to your suggestions.

    Hi Lorcan – Have you by any chance found a solution? The same is happening to me…

    If I inspect the element however the path seems to be correct. I still get a broken image.

    Thank you!

    Hi Lorcan & moeni,

    I’m an amateur, but I think I’ve found the solution!

    Instead of the function
    <?php echo get_template_directory_uri(); ?>

    you need to use
    <?php echo get_stylesheet_directory_uri(); ?>

    because get_template_directory_uri() calls the parent theme directory, while get_stylesheet_directory_uri() that of chile theme!

    So you should say:
    <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/logo.svg" width="150" height="150" alt="svg-logo">

    See: The function reference

    I studied multiple solutions mentioned by people on different sites and different themes.
    Eventually this combination did the trick for me:

    In header.php change:

    <h1 class="site-title"><a>" rel="home">
    <img src="https://yourdomain.com/wp-content/uploads/2016/04/yourlogo.png"
    width="100" height="100"></a></h1>
    <?php else : ?>
    <p class="site-title"><a>" rel="home">
    <img src="https://yourdomain.com/wp-content/uploads/2016/04/your logo.png" width="100" height="100"></a></p>

    In style.css change:

    .page h1.entry-title {
    			display:none;
    }

    I know this reply is a little late, but could work for someone else in the future.

    So this solution isn’t just specific to Twenty Sixteen, but I believe it could work for any theme (I’m not an expert in theme development, so I apologize in advance if this doesn’t work some of you, it worked for me):

    <!—–Put this code in Function.php—->

    function themeslug_theme_customizer( $wp_customize ) {
    $wp_customize->add_section( ‘themeslug_logo_section’ , array(
    ‘title’ => __( ‘Logo’, ‘themeslug’ ),
    ‘priority’ => 30,
    ‘description’ => ‘Upload a logo to replace the default site name and description in the header’,
    ) );
    $wp_customize->add_setting( ‘themeslug_logo’ );
    $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, ‘themeslug_logo’, array(
    ‘label’ => __( ‘Logo’, ‘themeslug’ ),
    ‘section’ => ‘themeslug_logo_section’,
    ‘settings’ => ‘themeslug_logo’,
    ) ) );
    }
    add_action(‘customize_register’, ‘themeslug_theme_customizer’);

    <!——And put this code where you want to display the logo (for instance, I put it in header.php before the main menu)——–>

    <?php if ( get_theme_mod( ‘themeslug_logo’ ) ) : ?>
    <div class=’site-logo’>
    <img src='<?php echo esc_url( get_theme_mod( ‘themeslug_logo’ ) ); ?>’ alt='<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>’>
    </div>
    <?php endif; ?>
    <!—————End of code————>

    You’ll have to go to Appearance / Customize to add/change the logo image. Hope this helps! ??

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Add a logo’ is closed to new replies.