WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How To Add a Logo When My WP Theme Doesn't Have The In-Build Option? (5 posts)

  1. Davidoffo
    Member
    Posted 1 year ago #

    Hello guys, first of all, I want to thank to the entire community. I know I am just a lurker, but without all the wonderful people like you, wordpress would be nothing :)

    Anyway, I have this free theme from wordpress's catalog: Glossy Stylo, By aliwkbgVersion 1.1.8

    After I did some edits here and there, I realized that I got stuck in the same problem as I had when I used it on another site. I don't know how to put a logo instead of the ugly TITLE.On top of that, the title is of the same color as my background, but either way, I would love to know how I can put my own logo. I looked in the editor, but haven't found where to edit it. Actually I don't know what I am doing, as I'm not good at coding, but I could manage to make it with some instructions.

    Would really appreciate if anyone knows that theme and can tell me how on earth I could put a logo instead of that TITLE that goes as logo~. I wonder why the creator didn't made this option :(

    Help?

    [ Please do not bump, that's not permitted here. If it's that urgent then please consider hiring someone. ]

  2. zeaks
    Member
    Posted 1 year ago #

    I'm not familiar with that particular theme, but this http://zeaks.org/tutorials/how-to-add-a-logo-to-twenty-eleven-theme/ 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.

  3. Sridhar Katakam
    Member
    Posted 1 year ago #

    What is the URL of your desired logo?

    Can you provide the URL of your site?

  4. Davidoffo
    Member
    Posted 1 year ago #

    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 :)

  5. Anjana Solanki
    Member
    Posted 8 months ago #

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

    </div>
    <?php endif; ?>

    And Customize your theme.

Topic Closed

This topic has been closed to new replies.

About this Topic