1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to add title tag to Header

Discussion in 'HTML & Website Design' started by ademmeda, Nov 6, 2009.

  1. #1
    Hi,

    I recently changed the header of my blog and when it is clicked, homepage shows up as I wished. However, I need one more thing. To add title tag to the header so that when someone points over the header, the homepage url is showed on the status bar. Anybody have experience on such kind of stuff?
    How can I add that title tag? The url is: http://dailyaffiliatetips.com/

    EDIT: I mean, when you point the cursor on the header image, I want the homepage url to be displayed on the status bar of the browser. Is this possible?
     
    Last edited: Nov 6, 2009
    ademmeda, Nov 6, 2009 IP
  2. Pwnography

    Pwnography Member

    Messages:
    58
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #2
    Are you asking to change the Title bar on Hover, as in the Top of the Browser. Or are you asking to change the bottom left Link URL indicator so when you hover over it shows a different link... can you explain a little more.. that sentance is a little confusing for me.

    -Pwn
     
    Pwnography, Nov 6, 2009 IP
  3. ExtremeData

    ExtremeData Well-Known Member

    Messages:
    450
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    125
    #3
    You have to use "<a href..." instead of "onclick" javascript event.
     
    ExtremeData, Nov 6, 2009 IP
  4. Pwnography

    Pwnography Member

    Messages:
    58
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #4
    Pwnography, Nov 6, 2009 IP
    ademmeda likes this.
  5. ademmeda

    ademmeda Active Member

    Messages:
    354
    Likes Received:
    3
    Best Answers:
    3
    Trophy Points:
    70
    #5
    What you suggest works, however I think I pasted that code in a wrong place. The rest of the site slided to left.

    The code of my header file is below. Where to paste your code?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

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

    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>


    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <style type="text/css" media="screen">

    /* BEGIN IMAGE CSS */
    /* To accomodate differing install paths of WordPress, images are referred only here,
    and not in the wp-layout.css file. If you prefer to use only CSS for colors and what
    not, then go right ahead and delete the following lines, and the image files. */

    body { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgcolor.png"); } <?php /* Checks to see whether it needs a sidebar or not */ if ((! $withcomments) && (! is_single()) && (! is_page())) { ?>
    #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg.png") repeat-y top; border: none; } <?php } else { // No sidebar ?>
    #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg.png") repeat-y top; border: none; } <?php } ?>
    #header { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickheader.png") no-repeat bottom center; }
    #footer { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickfooter.png") no-repeat bottom; border: none;}


    /* Because the template is slightly different, size-wise, with images, this needs to be set here
    If you don't want to use the template's images, you can also delete the following two lines. */

    #header { margin: 0 !important; margin: 0px 0px 0px 1px; padding: 0px; height: 136px; width: 820px; }
    #headerimg { margin: -2px 0px 0; height: 138px; width: 820px; }
    /* END IMAGE CSS */


    /* To ease the insertion of a personal header image, I have done it in such a way,
    that you simply drop in an image called 'personalheader.jpg' into your /images/
    directory. Dimensions should be at least 820px x 138px. Anything above that will
    get cropped off of the image. */

    /*
    #headerimg { background: url('<?php bloginfo('stylesheet_directory'); ?>/images/personalheader.png') no-repeat top;}
    */

    </style>

    <?php wp_get_archives('type=monthly&format=link'); ?>

    <?php wp_head(); ?>
    </head>
    <body>

    <div id="page">


    <div id="header" onclick="location.href='http://dailyaffiliatetips.com/';" style="cursor: pointer;">

    </div>
    <hr />


     
    ademmeda, Nov 6, 2009 IP
  6. Pwnography

    Pwnography Member

    Messages:
    58
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #6
    <div id="page">


    <div id="header" onclick="location.href='http://dailyaffiliatetips.com/';" onmouseover="window.status='whateveryouwanttodispay'; return true" onmouseout="window.status=' '; return true" style="cursor: pointer;">

    </div>
    <hr />

    try that
     
    Pwnography, Nov 6, 2009 IP
  7. ademmeda

    ademmeda Active Member

    Messages:
    354
    Likes Received:
    3
    Best Answers:
    3
    Trophy Points:
    70
    #7
    Didn't work:(
     
    ademmeda, Nov 6, 2009 IP
  8. Pwnography

    Pwnography Member

    Messages:
    58
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #8
    As bad as this sounds, you are probably going to have to edit the actual template file for this.

    I just re-read your code, and see that its wordpress. You are going to have to dig into the raw-html and find where its calling the image, find the variable, and surround it with your tags.
     
    Pwnography, Nov 6, 2009 IP
  9. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Who's brilliant idea was it to rape a simple div and make it whore itself out like an anchor???

    Anchors exist for a reason. They Are Hyperlinks. They are MEANT to be clicked on and browsers know how to deal with them!!! Why are you mimicing the behaviour of a true anchor by mutilating a plain old div with javascript????

    What is in that code is evil. Evil!

    
    <div id="header" onclick="location.href='http://dailyaffiliatetips.com/';" onmouseover="window.status='http://dailyaffiliatetips.com/'; return true" onmouseout="window.status=' '; return true" style="cursor: pointer;">
    	</div>
    
    Code (markup):
    ARG!
    How about
    
    <div id="header">
    <a href="http://dailyaffiliatetips.com/"><img src="/wp-content/themes/3col-kubrick/images/kubrickheader.png" width="820" height="138" alt="Home Page" /></a>
    </div>
    
    Code (markup):
    That would just make so much sense. Plain old anchor. People don't need to turn on Javajunk to slow their browsers down, because clicking on the anchor will take people home naturally, without any artificial sweeteners or additives.

    Just sweet sweet HTML. And except in Safari, which is a Mactardo browser, you will see your status bar url thingie wonderfully.

    Unless there was some strange, convoluted reason conceived in the underground cave-lair during a plot to take over the world where the zen-like simplicity and awesomness that is the anchor was not allowed? Like fooling robots from entering? Or people using mobiles to surf teh innerwebz? Or some other fiendish scheme?

    Or maybe Wordpress is trying to break the innerwebz?
     
    Stomme poes, Nov 6, 2009 IP
    ademmeda likes this.
  10. Pwnography

    Pwnography Member

    Messages:
    58
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #10

    Or perhaps, hes trying to change the link var not based on page but overall, and wordpress likes to resolute the imgfile to home path, which were trying to override by displaying a different title.
     
    Pwnography, Nov 6, 2009 IP
  11. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #11
    If he wants to mutilate bad code to make it do something that's naturally more difficult in browsers, that's fine, but it's bad code. There is absolutely no reason, ever, to replace a normally clickable element with a NON clickable element and then Javajunk it into acting like a clickable element.

    If he wants to change a url that's what mod_rewrite is for. If he wants to make a single change on all pages, that's why he's running PHP with includes and template madness.

    Anchors do this already. It's a built-in feature of a browser. If you want to LIE about which URL the user is going to (make the status bar show one url but have the user actually go to a different page) again, this is why mod_rewrite was invented. Heck, their own address bar will lie also! The only part that has to stay true is the domain name.

    Though if he's running on a microsoft iis server I don't even pretend to know what their version of mod_rewrite is, but there's one for Lightty and most other servers.
     
    Stomme poes, Nov 6, 2009 IP
  12. ademmeda

    ademmeda Active Member

    Messages:
    354
    Likes Received:
    3
    Best Answers:
    3
    Trophy Points:
    70
    #12
    That worked at last! You can see the result. Thanks a lot! You made me happy :eek:
     
    ademmeda, Nov 6, 2009 IP
  13. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Sorry, pwnography, I think you thought he was doing something else. I wasn't tryin to diss you, just the nasty spew that obviously came out of Turdpress. : (

    If he hadn't said that it worked then I would have wondered if I had misunderstood him.
     
    Stomme poes, Nov 6, 2009 IP
  14. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #14

    I have same issue only it for a forum .... How Do I add image headr in top of forum????
    please go here to this thread... http://forums.digitalpoint.com/showthread.php?t=1580867#post12952397


    or leave direction on it ....... can you tell me this one how do I add a header image in my smf forum ... I found one here www.kauaimassages.com/forum what I want to do is same to this forum here www.oahu-handyman.com/forum ... I have the header all ready but need to know where in the server admin to ad the header???? please help lol kudos,,...
     
    Aaron111, Nov 19, 2009 IP
  15. hdewantara

    hdewantara Well-Known Member

    Messages:
    536
    Likes Received:
    47
    Best Answers:
    25
    Trophy Points:
    155
    #15
    Just a note: it wouldn't work if a guest has disabled his browser's javascript capability to change status bar. It's a default I guess on FF 3.5.3
     
    hdewantara, Nov 20, 2009 IP
  16. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #16
    what about adding the meta data in the main index of forum????/ can you do that for seo purposes
     
    Aaron111, Nov 20, 2009 IP