• I have this code on my index.php :

    <?php
    get_header(); ?>
    
    <div class="container">
    <!-- Site-content -->
    <div class="site-content clearfix">
    
    <!-- main-column -->
    <section class="main-column">
    
    <div class="ribbon-container-newest-post">
    <article class="newest-post">
    <!-- Her I use a plugin to show the newest post -->
    <?php dynamic_sidebar('newest-post-banner'); ?>
    <?php echo get_the_excerpt(); ?>
    </article>
    <span class="ribbon"><?php the_category(); ?> </span>
    </div>
    
    <!-- Pagination -->
    <div class="pagination">
    <div class="nav-next alignleft"><?php previous_posts_link( '« Nyere posts' ); ?></div>
    <div class="nav-previous alignright"><?php next_posts_link( 'Ældre indlæg »' ); ?></div>
    </div>
    
    <div class="posts_wrapper clearfix">
    
    <?php
    
    /* This is to show both "post" and "video" post types */
    $args = array(
    'post_type' => array ('post','video'),
    'offset' => 1); // Start from the second
    query_posts($args);
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    
    ?>

    I’m completely new to wordpress, so I still don’t know the “right terms” to use!! My question is:
    How can I show all posts types starting from the second post??

    Without “offset=1” it was possible to show all the post types ( I have only 2 post types) and the “pagination” was working. But after I added “offset=1″, I get the same posts on all pages.
    On the browser I see: “http://localhost:8888/wordpress/page/2/&#8221;, but the “page 2” shows the same as in the page 1.

    Her is a picture of the blog:
    http://grafisk.kts.dk/elever/flar1/wordpress/foto1.png

    thanks!

  • The topic ‘Offset breaks pagination’ is closed to new replies.