GabrielRadic
Member
Posted 8 years ago #
Hello all,
I am trying to tweak the layout of my home page. Is there a way to test if the current page is a permalink page, an archive or the home page?
I tried everything and I've searched the forum for half a day. There must be something obvious that I am missing.
Please help. TIA.
Look at the address bar.
An archive is a permalinked page, and a permalinked page will look like an archive, if that makes sense.
GabrielRadic
Member
Posted 8 years ago #
Ugh... sorry about that.
What I mean is: What kind of PHP test should I perform inside index.php in order to have different output for the permalink pages and the home/other pages.
Something like
if ($justArticle) {
/* do article stuff */
} else {
/* do homepage or archive */
}
codergurl
Member
Posted 8 years ago #
<?php
if ($single) {
/* blah blah blah */
} else {
/* blah blah blah */
}
?>
In 1.3-alpha, you can use is_single() instead of $single.
You'll have to forgive podz, he's a little dense sometimes. ;P
TG
GabrielRadic
Member
Posted 8 years ago #
It worked, thanks codegurl! I knew it should be this easy :-)
NB: feeds for each topic is gold.