• On my clients website https://tinyurl.com/b444776 I have a strange problem of some posts not showing on the news page (index.php). After the first news post (which is correct, it is the newest post) on the page, there are several news articles missing which are published and should have been under the newest posts. However, these posts do show up on the front page “Nieuws” (https://tinyurl.com/a9kbh9v). These posts are for instance:

    1. https://tinyurl.com/b47b59s
    2. https://tinyurl.com/b88kpdm
    3. https://tinyurl.com/a3w9bax

    How can this happen? The code for my index.php file is the following:

    <?php get_header(); ?>
    <!-- start index.php -->
    	<?php if (have_posts()) : ?>
    		<?php while (have_posts()) : the_post(); ?>
    		    <?php if(!is_page()): ?>
    			    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    	    			<h1><?php the_title(); ?></h1>
    	    			<p class="meta">Geschreven door <?php the_author() ?> op <?php the_time('F jS, Y') ?></p>
    	    			<?php
    	    				if (is_search()) {
    	    					the_content_rss('', false, '', 50);
    	    				} else {
    	    					the_content('Read the rest of this entry &raquo;');
    	    				}
    	    			?>
    	    			<p class="meta">
    	    				<?php the_tags('Tags: ', ', ', '<br />'); ?>
    	    				<?php (!is_single() ? comments_popup_link('No Comments »', '1 Comment »', '% Comments »') : '') ?>
    	    			</p>
    	    		</div>
    	    	<?php else: ?>
    	    	    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    	    			<h1><?php the_title(); ?></h1>
    	    			<?php
    	    				if (is_search()) {
    	    					the_content_rss('', false, '', 50);
    	    				} else {
    	    					the_content('Read the rest of this entry &raquo;');
    	    				}
    	    			?>
    	    		</div>
    	    	<?php endif; ?>
    		<?php endwhile; ?>
    		<?php if (next_posts_link() || previous_posts_link()): ?>
    			<?php next_posts_link('&laquo; Older Entries') ?> |
    			<?php previous_posts_link('Newer Entries &raquo;') ?>
    		<?php endif ?>
    	<?php else : ?>
    		<h2>Not Found</h2>
    		<p>Sorry, but you are looking for something that isn't here.</p>
    		<?php get_search_form(); ?>
    	<?php endif; ?>
    
    </div>
    <?php get_sidebar(); ?>
    <!-- end index.php -->
    <?php get_footer(); ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Some posts not showing in index.php’ is closed to new replies.