I have stuff i want to show up on the index page of my blog (on the index template) i only want it to show up the first page but not on other pages further on. How do i get it to only show up on the main page?
I have stuff i want to show up on the index page of my blog (on the index template) i only want it to show up the first page but not on other pages further on. How do i get it to only show up on the main page?
Use the templates for all other pages, like the single page and archive page in the default theme, would be the easiest solution. Or use a conditional for is_home() if not.
Look around this page for all of your conditional needs:
I still don't understand all this stuff lol...ill have to play around alot
If you look in the default theme directory you should see "single.php" and "archive.php" - with those templates present they will display and not "index.php" when selecting a single post or archive (both off the front page).
If you wanted to go the other route, the conditional would go in the index page with something like this:
<?php if (is_home()) { ?>
blah blah blah
<?php } ?>
I'd recommend reading the instructions in the codex.
thanks that worked :) im really new to php and all
Then the codex is the place you wanna be ... but no swimming pools or movie stars.
Also note, that you can define a home.php template, that is ONLY loaded as the "home" page, then index.php becomes a catch-all, if the other templates are not loaded.
This topic has been closed to new replies.