I messed something up in my wordpress header

Discussion in 'PHP' started by DeluxeEdition, Nov 22, 2006.

  1. #1
    Can anyone tell me where I went wrong here? I'm pretty sure it's in this part of the 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 if ( is_single() ) { ?><? wp_title(''); ?><?php } else { ?><? bloginfo(?name?); ?>   :  <?php
    global $post;
    $my_cat_name = $wpdb->get_var("SELECT cat_name FROM $wpdb->categories, $wpdb->post2cat WHERE cat_ID = category_id AND post_id = $post->ID");
    echo strip_tags($my_cat_name);
    ?> <? } ?>
    
    </title>
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> 
    <!-- leave this for stats please -->
    Code (markup):
    I'm getting this error :

    Help - Thanks
     
    DeluxeEdition, Nov 22, 2006 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    
    bloginfo(?name?)
    
    PHP:
    Use single quotes instead of question marks.
     
    nico_swd, Nov 22, 2006 IP
    DeluxeEdition likes this.
  3. DeluxeEdition

    DeluxeEdition Active Member

    Messages:
    308
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Thanks that seems to have fixed it! As you can see I'm not a php programmer :rolleyes:
     
    DeluxeEdition, Nov 22, 2006 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    That's why we have this forum. :D
     
    nico_swd, Nov 22, 2006 IP