I'm sure this has been asked many times, but how do you add a logo to the left of the site title on the Twenty Eleven child theme?

有帮助吗?

解决方案

You would have to navigate to the WordPress Twenty Eleven Theme folder in your WordPress installation at the following location:

/wp-content/themes/twentyeleven

Next open up the file called header.php and find the part that says <h1 id="site-title">. Finally, add your logo image before this along with anything else you may want.

Bare in mind you may need to use some CSS, like display: inline; for example to get it to sit on the same line as the text.

其他提示

Put your logo image in theme folder images folder. And then go and set the logo image in the header.php as follow.

  <img src="<?php bloginfo("template_url"); ?>/images/logo.png" alt="logo_image"  />   

and adjust some css. Done! :)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top