• Resolved drzgamer

    (@drzgamer)


    So far to show things on certain pages i us the code

    <?php get_header() ?>
    
    <?php
    
      if ( is_paged() ) {
      include(TEMPLATEPATH . '/video1.php');
      } 
    
      else {
      include(TEMPLATEPATH . '/video22.php');
      }
    ?>
    
    <?php get_footer() ?>

    Now what im trying to figure out is to show the content of the first post then the rest of the post the normal list

Viewing 1 replies (of 1 total)
  • Thread Starter drzgamer

    (@drzgamer)

    I solved it just used this code

    <?php if (have_posts()) : ?>
    <?php $post = $posts[0]; $c=0;?>
    <?php while (have_posts()) : the_post(); ?>
    
    <?php $c++;
    if( $c == 1) :?>
    <h1>The first post on the main index page</h1>
    <?php the_title(); ?>
    <?php the_excerpt(); ?>
    
    <?php else :?>
    <h2><?php the_title(); ?></h2>
    <?php the_content(); ?>
    <?php endif;?>
    
    <?php endwhile; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Category Page’ is closed to new replies.