Reputation: 107
Sorry for how simple this must be.
I'm having trouble linking the site title in my Wordpress theme to the site URL.
This is my code:
<h1><img id="logo" src="<?php echo $logo; ?>" alt="<?php echo get_bloginfo('name').$tagline; ?>" /></h1>
Can someone help me link this to the site URL? I need to create something I can add "text-decoration: none;" to.
Thanks
Upvotes: 0
Views: 134
Reputation: 27247
<h1>
<a href="/" style="text-decoration:none">
<img id="logo" src="<?php echo $logo; ?>" alt="<?php echo get_bloginfo('name').$tagline; ?>" />
</a>
</h1>
That easy!
edit
Add it also to the text-only header:
<h1 id="page-title">
<a href="/" style="text-decoration:none">
<?php bloginfo('name'); ?>
</a>
</h1>
Upvotes: 1
Reputation: 4476
<h1>
<a href="<?php get_site_url(); ?>">
<img id="logo" src="<?php echo $logo; ?>" alt="<?php echo get_bloginfo('name') . $tagline; ?>" />
</a>
</h1>
Documentation : http://codex.wordpress.org/Function_Reference/get_site_url
Upvotes: 0