Support » Fixing WordPress » Remove additional loaded title

  • Hi

    I´m trying to make something similar to a blog list with pages. The page isn´t mine so I´m afraid I cant answer why blog posts arent used, it´s simply the way it is. This is the code

    <?php // Retrieve only Pages and exclude About, links, contact, etc.
             $args = array(       // set up arguments
    	         'post_type' => 'page',              // Only Pages
    	         'post__not_in' => array(2)   // Do NOT show postID 2,9,5,or 12
           query_posts($args);   // execute the arguments
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <div class="list-entries">
    		<h1 class="entry-title entry-header"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
    		<p class="entry-date">Publicerad <?php the_date() ?></p>
            <p class="entry-content"><?php   $content = get_the_content();
    					$content = strip_tags($content);
    					echo substr($content, 0, 2);
    	<?php endwhile; ?>
    	<?php else : ?>
    	<?php endif; ?>

    The problem is that I get a duplicate instance of the first page. What differs the first page from the other pages is that is first and that it has comments.

    Any ideas?

  • The topic ‘Remove additional loaded title’ is closed to new replies.