Making a custom theme and want to know how to style first post different from the rest After months of figuring out how to upload a background image, I decided to scrap that and use a solid color with the color picker.

Now I moving on making a custom theme and it's very different from making a WordPress theme. So I need help with the following:

On my page.tpl.php, is there a way to have the first post different from the rest of the posts? Example: First post has a title, date, time and a description. The rest just have a date and title.

Also I don't want to use view module as it looks complicated to setup and I want to use as little of modules as possible.

All help is greatly appreciated and thanks for understanding my annoying questions for help,
Gregory S.

UPDATE: Looks like I'll have to do views after all.
What you can do is:


Create a custom page using hook_menu.
Use Drupal's Database (DBTNG) to get your list of contents. You can do two separate queries for this. The first one would just return one result with more fields than the second. Also you could add the Drupal's pager functionality right out of the box here since you will be using db_select.
Use hook_theme to create the template for your "node teaser" so that it makes your raw data manipulation separate from your presentation hence the need for a custom template.


Your main code would somewhat look like:

function YOURMODULE_page_view() {
  $special_node = db_select(...);
  $nodes = db_select(...);
  $output = array();

  // do stuff here for $special_node_fields
  $output[] = theme('custom_node_theme', $special_node_fields);

  // look through all remaining nodes
  while($nodes) {
    // do stuff here for $node_fields
    $output[] = theme('custom_node_theme', $node_fields);
  }

  return $output;
}


This gives you better view on the data manipulation you need to get the list you need.

Also don't forget to replace the Default front page value with your custom page in the Site Configuration page.