Wordpress codes which are still mystery...

Discussion in 'PHP' started by dura_killer, Oct 14, 2008.

  1. #1
    Please explain the functions and the action of codes I list below from head part.
    Please explain the follwoing--
    1. http-equiv="Content-Type"
    2. is_single and raquo
    3. Entire code in <script> area?
    4. what does meta 'description' & 'homedesc' do?
    5. Whats the use of putting <?php wp_get_archives('type=monthly&format=link'); ?> and <?php wp_head(); ?> in the head are?

    
    <head>
    <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>
    <script src="<?php bloginfo('stylesheet_directory'); ?>/accordian.js" type="text/javascript" language="javascript"></script>
    
    <meta name="homedesc" content="Enter your site description here" />
    <!--PLEASE FILL-->
    <meta name="keywords" content="Enter your site keywords here" />
    <!--PLEASE FILL-->
    <meta name="robots" content="index,follow" />
    <!--PLEASE FILL-->
    <meta name="author" content="Your Name" />
    <!--PLEASE FILL-->
    <meta name="description" content="1 line description of your site" />
    <!--PLEASE FILL-->
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
    <!-- leave this for stats please -->
    <style type="text/css" media="screen">
    @import url( <?php bloginfo('stylesheet_url');
    ?> );
    </style>
    <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_get_archives('type=monthly&format=link'); ?>
    <?php //comments_popup_script(); // off by default ?>
    <?php wp_head(); ?>
    </head>
    PHP:

     
    dura_killer, Oct 14, 2008 IP
  2. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #2
    1. http-content is setting the content type(is it html, text, an image or whatever) for the page. Its equivalent to setting an http header (which is most often controlled by the webserver but can be set via a scripting language).
    2. right double angle quotes or raquo. is_single is a wordpress function to determine if it is displaying a single post (versus showing a list of posts).
    3. Script is including a javascript file apparently for some type of menu by the accordian.js filename.
    4. Look up meta keywords on google.
    5. The archive function is to include a link to the archive page. wp_head() should always remain, it is used by the plugin system in WP (and probably other functions as well).
     
    shallowink, Oct 14, 2008 IP
    dura_killer likes this.