Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   [SOLVED] Link my header logo to the homepage (http://forum.bytesforall.com/showthread.php?t=18835)

Stiino0 Nov 4, 2012 12:26 PM

[SOLVED] Link my header logo to the homepage
 
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!

lmilesw Nov 4, 2012 03:25 PM

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>

Stiino0 Nov 5, 2012 01:33 AM

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!

juggledad Nov 5, 2012 04:57 AM

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>


Stiino0 Nov 5, 2012 05:36 AM

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!

juggledad Nov 5, 2012 06:03 AM

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.

Stiino0 Nov 5, 2012 06:58 AM

Omg... indeed I had the wrong url :) Thank you! This was indeed what I was looking for!

Thanks!


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

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