Wordpress codes which are still mystery...

Status
Not open for further replies.

Dura_Killer

Banned
Sep 13, 2008
32
0
0
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?
Code:
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title>
<?php bloginfo('name'); ?>
<?php if ( is_single() ) { ?>
» 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>
 


The script line is just pulling in a javascript file for an accordian menu. The meta tags already explain what they are:
meta name="homedesc" content="Enter your site description here"

Have you tried a Google search? I'm sure these questions have been asked and answered before.
 
1: meta content type tag is used to declare the character set of the website
2: is_single = means that the script will be exectuted on single posts.
3: raquo is the html name for this symbol "»"
4: just google those meta tags...
5: <?php wp_head(); ?> is a hook so plugins know where to insert code. Not sure why wp_get_archives is in the header. Look here: Template Tags/wp get archives « WordPress Codex
 
5: <?php wp_head(); ?> is a hook so plugins know where to insert code. Not sure why wp_get_archives is in the header. Look here: Template Tags/wp get archives « WordPress Codex

wp_get_archives('format=link'); creates <link rel="archives"> HTML tags which help with indexing. These tags won't help with ranking - but search enginges can use these pointers to index archives pages and those pages which are linked from there.

I do have to say, I personally haven't noticed any difference with or without this call. But it is also hard to track and nail down... it doesn't hurt to leave it in there, since it might help and has no drawbacks.
 
Status
Not open for further replies.