Support » Themes and Templates » How To Add a Logo When My WP Theme Doesn't Have The In-Build Option?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m not familiar with that particular theme, but this explains how to add a logo to Twenty Eleven theme.

    The same method should work for any theme, just change the #site-title class to whatever your theme is using and adjust it accordingly.

    You’ll basically be adding a background image (your logo) to the site title, then hiding the title.

    What is the URL of your desired logo?

    Can you provide the URL of your site?

    zeaks, I tried to put that code from the link you provided, I tried to put it in the css file of my theme, but it doesn’t change anything. I don’t know where exactly to put it or so. do I need an exact location or is it exaclt on css file..I am confused…


    Nevermind, I found what to edit. I selected the title and then clicekd right and clicked Insect element (using G.Chrome). then I realized that I should change something in the header, so I did, I replaced a scr logo with that text and it works now, thanks for help anyway 🙂

    Put 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 logo:

    <?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’ ) ); ?>’>

    <?php endif; ?>

    And Customize your theme.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How To Add a Logo When My WP Theme Doesn't Have The In-Build Option?’ is closed to new replies.