Putting it all to together
Now that you’ve just learned a whole bunch of stuff about the index, let’s try a few things to see just how layouting is effected by the index.
First, remember that php function calling for the post content? [php][/php]. Find that line, and change it to [php][/php]. So what exactly did that do? Save the index and reload your sites index. All your posts more than 120 words should now be showing WordPress auto-generated excerpts, or your own if you specified them during posts. The read the rest of this link now says “Really, Read the Rest.”
Now, how about getting rid of the post content all together? This is seen on Devlounge’s homepage under news, where we simply grab the post title and link to it. This can be very useful after your learn some of our advanced techniques (next week!).
To accomplish this, you simple remove the code calling for the content, or excerpt. Delete it’s surrounding div’s as well, to clean up the code.
[php]
[/php]
After making this change, your posts will show titles only, and link to the actual full page content.
If you’ve been keeping up with our code changes, you’re full index will look like this.
[php]
Not Found
Sorry, but you are looking for something that isn’t here.
[/php]
Taking on the Sidebar
The next step to a better homepage is modifing the sidebar to actually make it useful. To start off, the WP Sidebar is bare – with nothing but links to site pages, blogroll links, w3c validators, and a search bar. How does that make the sidebar useful.
[php]
[/php]