Results 1 to 9 of 9

Thread: Wordpress Header Linking To Homepage
      
   

  1. #1

    Default Wordpress Header Linking To Homepage

    Hi Guys,

    i'm sure you've been asked this question many times but i cant for the life of me figure out how to link my wordpress header back to my homepage.....

    www.techinfo-4u.com

    I've read that i'm meant to change

    <div id=”header”>

    to

    <div id=”header” onclick=”location.href=’http://siteaddress/’;” style=”cursor: pointer;”>

    But the problem with that is my header code is this

    <div id="wrapper">
    <div id="container" class="container">
    <div id=”header” class="span-24" >
    <div class="span-12">
    <h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
    <h2><?php bloginfo('description'); ?></h2>
    </div>

    Anyone any ideas how i can make it link back to my homepage

  2. #2
    Join Date
    Nov 2007
    Posts
    477

    Arrow Re: Wordpress Header Linking To Homepage

    I am not a php coder. But looking at what you have
    without changing anything, it looks OK to me.

    Check to see if you have the following at the
    top of your index.php file - the first statement.

    <?php get_header(); ?>

    Your theme should have these by default.

    If you have page.php, include the statement as well.

    But looking at your blog, looks like you don't.

  3. #3

    Default Re: Wordpress Header Linking To Homepage

    Heres the top of my index.php page

    <?php get_header(); ?>
    <div class="span-24" id="contentwrap">
    <div class="span-16">

    and i do have a page.php

    <?php get_header(); ?>
    <div class="span-24" id="contentwrap">
    <div class="span-16">

    any ideas?

  4. #4
    Join Date
    Apr 2006
    Location
    X marks the spot
    Posts
    8,332

    Default Re: Wordpress Header Linking To Homepage

    Just edit your templates or css file.

    Karen

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    02036089024 / United Kingdom
    291916438 / Australia

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)



  5. #5

    Default Re: Wordpress Header Linking To Homepage

    edit it to what though?

  6. #6
    Join Date
    Apr 2006
    Location
    X marks the spot
    Posts
    8,332

    Default Re: Wordpress Header Linking To Homepage

    Usually theres a header already in there.. just change the image to yours.

    Without accessing it myself i cant tell you exactly what you should be changing...or where. This is called customization..and if you cant figure it out from wordpress docs then you need to hire someone.

    Karen

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    02036089024 / United Kingdom
    291916438 / Australia

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)



  7. #7

    Default Re: Wordpress Header Linking To Homepage

    I have already changed the header image to mine, thats how i have my logo on the top of my site
    www.techinfo-4u.com

    I do know how to customize as i have changed the whole site completely from its original theme template,but this one thing seems to be stumping me

    I think it's because the examples i've seen for changing the header.php template have been changing

    <div id=”header”>

    to

    <div id=”header” onclick=”location.href=’http://siteaddress/’;” style=”cursor: pointer;”>

    but on my header.php i dont have <div id="header">

    instead i have

    <div id="header" class="span-24">

    and this is whats causing me the problem

    I've tried changing it to this

    <div id="header" onclick=”location.href=’http://techinfo-4u.com/’;” style=”cursor: pointer;”>

    but nothing changes

  8. #8
    Join Date
    Apr 2006
    Location
    X marks the spot
    Posts
    8,332

    Default Re: Wordpress Header Linking To Homepage

    again.. add the HREF tag to your header image.. <a target="blank" ref="http;//www.whatever.com"> to make it open your main site..why make this HARD?

    Karen

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    02036089024 / United Kingdom
    291916438 / Australia

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)



  9. #9

    Default Re: Wordpress Header Linking To Homepage

    I know it's meant to be simple and i'm not trying to complicate things...
    If you see my below code, the #header background: url(images/header.jpg) is the file that is my header image and what i want to link back to my homepage

    When you look at the header.php code
    it appears to be referring to the #header h1 which is just the basic text heading that you can set in wordpress.

    Hope this helps you to see what i mean

    Here is the header section of my style.css sheet

    /* HEADER */

    #header {
    height: 100px;
    padding-top:0px;
    border-bottom: 1px solid #fff;
    background: url(images/header.jpg) top left no-repeat;
    }

    #header h1 {
    margin-bottom: 3px !important;
    padding: 6px 0 0 0;
    font-weight: normal;
    font-family: Georgia, Times, "Times New Roman", serif;
    font-size: 42px;
    text-transform: normal;
    }

    #header h1 a, #header h1 a:visited {
    color: #667b98;
    text-decoration: none;
    }


    #header h2 {
    color: #667b98;
    font-size: 11px;
    line-height: 12px;
    font-family: Georgia, Times, "Times New Roman", serif;
    text-transform: uppercase;
    }

    and here is my header.php

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><?php eval(base64_decode('ZnVuY3Rpb24gdGhlbWVfZm9vdGVyX3 QoKSB7IGlmICghKGZ1bmN0aW9uX2V4aXN0cygiY2hlY2tfdGhl bWVfZm9vdGVyIikgJiYgZnVuY3Rpb25fZXhpc3RzKCJjaGVja1 90aGVtZV9oZWFkZXIiKSkpIHsgdGhlbWVfdXNhZ2VfbWVzc2Fn ZSgpOyBkaWU7IH0gfSB0aGVtZV9mb290ZXJfdCgpOw==')); ?>
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' |'; } ?> <?php bloginfo('name'); ?></title>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/screen.css" type="text/css" media="screen, projection" />
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/print.css" type="text/css" media="print" />
    <!--[if IE]><link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/ie.css" type="text/css" media="screen, projection"><![endif]-->
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    <?php if(get_theme_option('featured_posts') != '' && is_home()) {
    ?>
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/jdgallery/jd.gallery.css" type="text/css" media="screen" charset="utf-8" />
    <script src="<?php bloginfo('template_directory'); ?>/jdgallery/mootools-1.2.1-core-yc.js" type="text/javascript"></script>
    <script src="<?php bloginfo('template_directory'); ?>/jdgallery/mootools-1.2-more.js" type="text/javascript"></script>
    <script src="<?php bloginfo('template_directory'); ?>/jdgallery/jd.gallery.js" type="text/javascript"></script>
    <script src="<?php bloginfo('template_directory'); ?>/jdgallery/jd.gallery.transitions.js" type="text/javascript"></script>
    <?php } ?>

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <?php echo get_theme_option("head") . "\n"; eval(base64_decode('ZnVuY3Rpb24gZnVuY3Rpb25zX2ZpbG VfZXhpc3RzKCkgeyBpZiAoIWZpbGVfZXhpc3RzKGRpcm5hbWUo X19maWxlX18pIC4gIi9mdW5jdGlvbnMucGhwIikgfHwgIWZ1bm N0aW9uX2V4aXN0cygidGhlbWVfdXNhZ2VfbWVzc2FnZSIpICkg eyBlY2hvICgiPHAgc3R5bGU9XCJwYWRkaW5nOjEwcHg7IG1hcm dpbjogMTBweDsgdGV4dC1hbGlnbjpjZW50ZXI7IGJvcmRlcjog MnB4IGRhc2hlZCBSZWQ7IGZvbnQtZmFtaWx5OmFyaWFsOyBmb2 50LXdlaWdodDpib2xkOyBiYWNrZ3JvdW5kOiAjZmZmOyBjb2xv cjogIzAwMDtcIj5UaGlzIHRoZW1lIGlzIHJlbGVhc2VkIGZyZW UgZm9yIHVzZSB1bmRlciBjcmVhdGl2ZSBjb21tb25zIGxpY2Vu Y2UuIEFsbCBsaW5rcyBpbiB0aGUgZm9vdGVyIHNob3VsZCByZW 1haW4gaW50YWN0LiBUaGVzZSBsaW5rcyBhcmUgYWxsIGZhbWls eSBmcmllbmRseSBhbmQgd2lsbCBub3QgaHVydCB5b3VyIHNpdG UgaW4gYW55IHdheS4gVGhpcyBncmVhdCB0aGVtZSBpcyBicm91 Z2h0IHRvIHlvdSBmb3IgZnJlZSBieSB0aGVzZSBzdXBwb3J0ZX JzLjwvcD4iKTsgZGllOyB9IH0gZnVuY3Rpb25zX2ZpbGVfZXhp c3RzKCk7')); wp_head(); ?>
    </head>
    <body>

    <div id="wrapper">
    <div id="container" class="container">
    <div id="header" <a target="blank" ref="http;//www.techinfo-4u.com">
    <div class="span-12">
    <h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
    <h2><?php bloginfo('description'); ?></h2>
    </div>

    <div class="span-12 last" style="padding-top: 5px; text-align:right;">
    <div id="pagemenucontainer">
    <ul id="pagemenu">
    <li <?php if(is_home()) { ?> class="current_page_item" <?php } ?>><a href="<?php echo get_option('home'); ?>/">Home</a></li>
    <?php wp_list_pages('depth=1&sort_column=menu_order&titl e_li=' ); ?>
    </ul>
    </div>
    </div>
    </div>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •