Ready to get started?Download WordPress


[resolved] Inserting an image in PHP coding (7 posts)

  1. aleks77
    Posted 5 years ago #


    I downloaded the Blue Lucas theme, but it does not offer me the option to easily include a logo.

    I found in the coding the following PHP lines, which define the title of the blog:

    <div class="headerleft">

    <h1>/"><?php bloginfo('name'); ?></h1>
    <?php bloginfo('description'); ?>


    On the website, the bloginfo('description') and the bloginfo ('name')are vertically aligned. I want to place my logo to the left of both the 'name' and the 'description'. How can I do this with PHP? What is the code to use, and where do I place it? I read some articles already on this, but whatever I tried had returned an error so far.


  2. esmi
    Forum Moderator
    Posted 5 years ago #

    A link to your site might help...

  3. aleks77
    Posted 5 years ago #

  4. esmi
    Forum Moderator
    Posted 5 years ago #

    You don't have much room. Only 275px by 80px to house both your blog name/description and a logo image. What are the dimensions of your logo image?

  5. change the style.css - to include the logo as a background image:
    (for instance)

    .headerleft {
    	/*width: 275px;*/
    	float: left;
    	margin: 0px;
    	padding: 0px;
    	overflow: hidden;
    background: url(images/logo.jpg) left top no-repeat;
    padding-left:90px; }
  6. aleks77
    Posted 5 years ago #

    Hi... thanks for the solution on the background, I love the idea.

    As to the space in the header... I can change the CSS coding a bit and make the left part a bit bigger. There is some unused white space on the right

  7. aleks77
    Posted 5 years ago #

    Works perfectly. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic