I think the excerpt must be within the loop. Though you probably can use some global for it.
Thread Starter
nieuws
(@nieuws)
Yes the excerpt has to be in the loop. On the other hand, the title tag works as well.
you can do a loop in the title tag..
Yes it can be done there is a plugin for meta tags for wordpress check that out too while ur at it.
Thread Starter
nieuws
(@nieuws)
Thanks for the hint. But it should be possible without a plugin as well i guess. Using a plugin is not very usefull for us because we write like 25 new articles per day. With the plugins you have to write your own keys for everypage.
http://www.nieuwszicht.com
<?php $xcrpt = get_the_excerpt(); echo $xcrpt; ?>
This outputs the excerpt. But I don’t think that this is the right way to do this as it should probably be in the loop. It works outside it though, but I don’t have enough knowledge of the WP internals to understand it all.
Thread Starter
nieuws
(@nieuws)
I installed the plugin but nothing seems to happen. I read the instructions clearly but perhaps iam missing something.
This is what i have now
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<title><?php
if(is_home()) {
// bloginfo('tagline');
echo 'My own title tag';
} else {
wp_title(""); echo ' - My site name';
}
?></title>
<META NAME="description" CONTENT="my description">
<META NAME="keywords" CONTENT="my keys">
<META NAME="ROBOTS" CONTENT="INDEX,FOLLOW">
<meta http-equiv="Content-Type" content="<?php bloginfo('charset'); ?>" />
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen, projection" />
<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 /*comments_popup_script(520, 550);*/ ?>
<?php wp_head(); ?>
<link href="nieuws.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript" SRC="java.js" type="text/javascript"></script>
<script language="Javascript" type="text/javascript" src="http://www.nieuwszicht.com/sudoku.js"></script>
</head>