Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

[SOLVED] Link my header logo to the homepage


  #1  
Old Nov 4, 2012, 12:26 PM
Stiino0
 
30 posts · Nov 2012
Hi All,

I have been lurking this forum ever since I had my first problems with the theme, and found it very useful untill this very day. I did not find any thread that copes with the following.

I am trying to get my header logo to link to my homepage. (I have a 'Home' button in my menu, but it just seems standard to also link the logo to the homepage.)

Here is where I am right now: in my header.php I linked my img and put it in the correct position, but in the code that was there, my 'a' tag was behind my img, therefor it could never have linked to the correct page. When I try to put my img tag (correctly) in my 'a' tag with my href put correctly, my image (which normally shows) disappears!

Here is my current header.php (have been trying some things with php coding, but also putting the href directly to the page)

correct href would be:
Code:
<a href="http://localhost/wordpress"></a>
I should also note that I am currently only running my Montezuma theme on my localhost, when I have it completely the way I want it I will find a good hosting server and will upload the files.

I hope y'all can help me out! Love the Montezuma theme and this community! Very helpful it seems!
  #2  
Old Nov 4, 2012, 03:25 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
The image should be between the a tags. The syntax should be something more like
HTML Code:
<a href="<?php echo home_url(); ?>"><img src="http://localhost/wordpress/wp-content/uploads/2012/11/chikaralogo.jpg" /></a>
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Nov 5, 2012, 01:33 AM
Stiino0
 
30 posts · Nov 2012
Hi Lmilesw,

First of all, thanks for replying! Sadly my image disappears when i do this. I know that my image could only be clickable if I indeed put it between the a tags, but it is even worse when my image no longer shows.. I really want this to be possible, but if no image shows at all it is even worse.

I hope someone can help me!
  #4  
Old Nov 5, 2012, 04:57 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
You have to remember this is a responsive theme so when you make changes you generally have to make adjustments elsewhere. In this case if you want to add a logo image it needs to be seperate so you could do something like this (NOTICE there is a new DIV and the col sizes have changed)
HTML Code:
<div id="banner-bg" class="cf">
	<div id="banner" class="row">
		<div id="logo-img" class="col2">
		  <a href="<?php echo home_url(); ?>">
              <img src="http://localhost/wordpress/wp-content/uploads/2012/11/chikaralogo.jpg">
          </a>
		</div>
		<div id="logo-area" class="col3">
			<<?php bfa_if_front_else( 'h1', 'h3' ); ?> id="sitetitle">
				<a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a>
			<<?php bfa_if_front_else( 'h1', 'h3' ); ?>>
			<p id="tagline"><?php bloginfo( 'description' ); ?></p>
		</div>
		<?php wp_nav_menu( array( 
			'container' => 'nav', 
			'container_class' => 'menu-wrapper col7', 
			'container_id' => 'menu1-wrapper', 
			'menu_id' => 'menu1', 
			'menu_class' => 'cf menu', 
			'theme_location' => 'menu1', 
			'fallback_cb' => 'bfa_page_menu' 
		) ); ?>
	</div>
</div>

<a href="<?php bloginfo( 'rss2_url' ); ?>" class="rsslink" title="<?php _e( 'Subscribe to RSS Feed', 'montezuma' ); ?>"></a>
		

<div id="breadcrumbs1-bg">
	<nav id="breadcrumbs1" class="breadcrumbs lw">
		<?php bfa_breadcrumbs( 'breadcrumbs1' ); ?>
	</nav>
</div>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Nov 5, 2012, 05:36 AM
Stiino0
 
30 posts · Nov 2012
Hi Juggledad,

I tried your method but when I copy it there are 2 </div> which are red and my image doesn't show anymore.

Its the </div> right above
Code:
<?php wp_nav_menu( array(
and the </div> right under
Code:
) ); ?>
Other than that this will probably work! Thanks again for checking!
  #6  
Old Nov 5, 2012, 06:03 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
has the image been replaced with a little box with a question mark? if so then your url pointing to the image is incorrect and needs to be fixed.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Nov 5, 2012, 06:58 AM
Stiino0
 
30 posts · Nov 2012
Omg... indeed I had the wrong url Thank you! This was indeed what I was looking for!

Thanks!

Bookmarks

Tags
header, header logo, img in a tag, logo

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Trying to add my logo to the header but only get a link, no image DeonneK Header configuration & styling 11 Aug 18, 2012 08:58 AM
[SOLVED] how to link logo in header to more than one url emaalyon Header configuration & styling 6 Feb 28, 2011 11:16 PM
[SOLVED] Changing the link for the Header Logo papalagi Header configuration & styling 0 Dec 14, 2009 02:06 AM


All times are GMT -6. The time now is 01:32 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.