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.

Wordpress :: HELP!! Losing visitors on 404 page.

Discussion in 'WordPress' started by Nite, May 9, 2008.

  1. AidenChong

    AidenChong Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #21
    <!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'); ?>" />
    [COLOR="Red"]<?php if(is_404())echo '<meta name="robots" content="noindex" />';?>[/COLOR]
    
    <title>
    	<?php 
    	if(is_home()) {  
    		echo get_bloginfo('description') . " &raquo; " . get_bloginfo('name'); 
    	} 
    	else { 
    		echo wp_title('', false) . " &raquo; " . get_bloginfo('name'); 
    	} 
    	?>	
    </title>
    Code (markup):

    Hi , Nite . Is that the correct way (as shown above) to add the code into my header.php file, under my wordpress theme folder ?

    Do you mean I need to access to http://mydomain.com/blog/wp-content/themes/THEMESNAME/header.php , and then right click to check the source code? If that is the case, I am not able to do it, I have tried , but I cannot access to that particular header.php file .. Please advise me on what should I do. Thanks a lot.
     
    AidenChong, May 17, 2008 IP
  2. Nite

    Nite Active Member

    Messages:
    440
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    68
    #22
    Here is the header for the theme that I'm using.

    
    <!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" xml:lang="en-US" lang="en-US">
    
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <meta http-equiv="content-language" content="en-US" />
    <meta name="language" content="en-US" />
    <meta name="distribution" content="global" />
    <?php if(is_404())echo '<meta name="robots" content="noindex" />
    '; else echo '<meta name="robots" content="follow, all" />
    '; ?>
    
    <title>
    
    <?php
    $pageTitle     = wp_title("",false); 
    if (empty($pageTitle)) {
        $pageTitle = get_bloginfo("name"); 
    }
    $pageTitle     = trim($pageTitle);
    print $pageTitle; 
    ?>
    
    </title>
    
    <style type="text/css" media="screen"><!-- @import url( <?php bloginfo('stylesheet_url'); ?> ); --></style>
    
    <link type="text/css" media="screen" rel="stylesheet" href="<?php bloginfo('template_url'); ?>/tab.css"  />
    <link rel="Shortcut Icon" href="<?php echo get_settings('home'); ?>/wp-content/themes/revolution_pro-10/images/favicon.ico" type="image/x-icon" />
    <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'); ?>" />
    
    <?php wp_head(); ?>
    </head>
    
    <body>
    
    Code (markup):
    If you cannot access the theme's header.php file, then it sounds like you're on some kind of shared blogging platform such as wordpress.org. I can access my header.php because I have my own dedicated server and manage everything myself.
     
    Nite, May 18, 2008 IP
  3. AidenChong

    AidenChong Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #23
    I can go in to my header.php , in my hosting account, which is under my /blog/ directory . What I meant that I can't access was , the verification part. I thought you mentioned that in order for me to verify if the code has been entered correctly on my header.php file, I would have to type this URL in my address bar : " http://mydomain.com/blog/wp-content/themes/THEMESNAME/header.php " <-- I don't think you can do that, do you ? .. When I type that into my address bar and hit ENTER , this phrase of word come out on my page : " Fatal error: Call to undefined function bloginfo() in /home/aced84/public_html/blog/wp-content/themes/i3theme-1-6-midnightblue/header.php on line 5 "

    However, I have successfully edited my header.php .. I just don't really know how should I verify if I have made the correct changes to the header.php file .

    Hope you get what I meant . Thanks for your help :)
     
    AidenChong, May 18, 2008 IP