Forums

Add Logo to twenty eleven theme (2 posts)

  1. Abernee
    Member
    Posted 5 months ago #

    Hi I'm a total beginner to wordpress and all things php. I installed wordpress on a virtual server using Virtualbox and Turnkey Linux just to play about with building a web site. I am fairly happy with the theme I would just like to add a logo to the header. I've found a few helpfull sites with tutorials for how to do this. I created a child twenty eleven theme and whithin the twenty eleven child folder I have an images folder with my logo in it.

    As per tutorial I have removed thee following code from the header.php

    <?php bloginfo( 'name' ); ?>

    And replaced it with the folowing.

    <img src="http://yoursite.com/imageurl.gif">

    I am having trouble with the "http://yoursite.com/imageurl.gif" part. I know this is where I enter the location of the image file but as its on a virtual server I am not sure what to do. The file location seems to be /var/www/wordpress/wp-content/themes/Twentyeleven-child/Images/logo.png Ive tryed that and many variations therof but no joy.

    If any of you could help I would be much obliged. Thanks.

  2. alchymyth
    The Sweeper
    Posted 5 months ago #

    try:

    <img src="<?php echo get_stylesheet_directory_uri(); ?>/Images/imageurl.gif">

    http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri

    or

    <img src="<?php echo get_stylesheet_directory(); ?>/Images/imageurl.gif">

    http://codex.wordpress.org/Function_Reference/get_stylesheet_directory

Reply

You must log in to post.

About this Topic