• For some reason, none of my posts are showing up on this page: https://theicedteaguy.com/blog

    Here is the code:

    <?php
    /*
    Template Name: Blog
    */
    ?>
    
    <?php include("header.php"); ?>
    <?php get_sidebar(); ?>
    
    <br />
    
    <h2>Blog</h2>
    
    <div class="posts-wrap"> 
    
     <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
    
    	<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    		<?php the_title('<h2 class="entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute('echo=0') . '" rel="bookmark">', 
    
    '</a></h2>'); ?>
    
    		<p class="byline">
    			<span class="author vcard"><?php the_author_posts_link(); ?></span> <span class="sep">|</span>
    			<abbr class="published" title="<?php the_time(__('l, F jS, Y, g:i a', 'example')); ?>"><?php the_time(__('F j, Y', 'example')); ?></abbr>
    			<?php edit_post_link(__('Edit', 'example'), ' <span class="sep">|</span> <span class="edit">', '</span> '); ?>
    		</p>
    
    		<div class="entry-content">
    			<?php the_content(__('Continue reading', 'example')); ?>
    			<?php wp_link_pages('before=<p class="pages">' . __('Pages:','example') . '&after=</p>'); ?>
    		</div>
    
    		<p class="entry-meta">
    			<span class="categories"><?php _e('Posted in', 'example'); ?> <?php the_category(', '); ?></span>
    			<?php the_tags('<span class="tags"> <span class="sep">|</span> ' . __('Tagged', 'example') . ' ', ', ', '</span>'); ?>
    			<span class="sep">|</span> <?php comments_popup_link(__('Leave a response', 'example'), __('1 Response', 'example'), __('% Responses', 
    
    'example'), 'comments-link', __('Comments closed', 'example')); ?>
    		</p>
    
    	</div>
    
    	<?php endwhile; ?>
    
    <?php else : ?>
    
    	<p class="no-posts"><?php _e('Sorry, no posts matched your criteria', 'example'); ?></p>
    
    <?php endif; ?>
    </div>
    
    <?php get_footer(); ?>
Viewing 5 replies - 1 through 5 (of 5 total)
  • hmm i used it as index.php on one of my wordpress, and it shows the posts

    Thread Starter martinfamily2005

    (@martinfamily2005)

    Strange…any ideas? I already tried disabling all plugins and trying again…..but that did not fix the issue.

    Thread Starter martinfamily2005

    (@martinfamily2005)

    Anyone have any ideas? Need this to work right away!

    Moderator t-p

    (@t-p)

    Have tried:
    -switching to the default theme (Twenty Ten) by renaming your current theme’s folder in wp-content/themes to rule out any theme-specific issue?

    If you don’t have access to your admin area, then access your server via FTP or SFTP or whatever file management application your host provides.

    Have you edited your functions.php file recently?

    I have the same problem, and the only recent change I’ve made is to the functions.php file. So I’ll have to figure out whats causing it.

    Probably a good place to start though.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Posts Not Showing Up’ is closed to new replies.