What version are you using? There’s a way to do that, but it depends if you are using 1.2.x or 1.[3|5]
Tg
An easy way would be to place whatever code you only want to see on a permalinked page in between these….
<?php if (!$single) { ?>
and
<?php } ?>
What that does is if it’s not a single post page, the code in between is run. The code in between can be simply the portion that calls the post body (function the_content) or whatever you want.
Thread Starter
AJ
(@aj)
it’s 1.2.2… TechGnome…
MtDew, that looks like a nice way to do it!
Thanks for the quick response guys!
just to expound on MDV’s answer, the way I’d do it (and have done it) is like this :
<?php if(!$single) {
the_excerpt();
}else{
the_content();
}
?>
That gives the excerpt text on the main page, but gives the full text on individual pages.
Tg
TechGnome…why not save an extra character. 😉
<?php if($single) {
the_content();
}else{
the_excerpt();
}
?>
6 of one, half-dozen of another. Potayto, potato. What ever boats your float.
In terms of optimization, it’s “Faster” using !. since that condition will execute more often than not, it doesn’t have to jump as far to execute the next line… since 1) were’ talking about micro milli seconds, 2) PHP is a scripted language – it proly doesn’t matter that much. It’s just my day job creaping in on me.
Tg
hehe…just giving you a hard time. 😉