• Resolved mellyg

    (@mellyg)


    Hi can anyone help me – I am trying to get the blog to work on the site – its on the page latest news https://www.educatetogethernc.com/?page_id=19

    I seem to have the code all wrong – I built most of the theme using a tutorial on lynda.com but can’t manage to get the blog to work. Below is the code for the page, does anyone know where I have gone wrong?

    <?php
    /*
    	Template Name: Blog
    */
    ?>
    <?php get_header(); ?>
    
    	<section id="content-container">
    			<div id="content" role="main">
    
    			<?php if ( have_posts() ) : ?>
    				<section id="regular-index" class="group">
    				<div id="regular-content">
    
    				<?php /* Start the Loop */ ?>
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php
    						get_template_part( 'content', get_post_format() );
    					?>
    
    				<?php endwhile; ?>
    
    				</div><!-- #regular-content -->
    				<div class="paginationBox group">
    					<?php kriesi_pagination($pages = '', $range = 3); ?>
    				</div>
    				</section><!-- #regular-index -->
    			<?php else : ?>
    
    				<article id="post-0" class="post no-results not-found">
    					<header class="entry-header">
    						<h1 class="entry-title"><?php _e( 'Nothing Found', 'anaximander' ); ?></h1>
    					</header><!-- .entry-header -->
    
    					<div class="entry-content">
    						<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'anaximander' ); ?></p>
    						<?php get_search_form(); ?>
    					</div><!-- .entry-content -->
    				</article><!-- #post-0 -->
    
    			<?php endif; ?>
    
    				<?php get_sidebar();  ?>
    			</div><!-- #content -->
    		</section><!-- #content-container -->
    
    <?php get_footer(); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • By default, the main posts page uses your theme’s index.php template file.

    Thread Starter mellyg

    (@mellyg)

    Ok thanks for the reply. Do you know how to I fix this?

    When I change the settings in the reading section it turns the home page into the a regular content page and the blog page into the current home page.

    Thread Starter mellyg

    (@mellyg)

    Heya – got some help it was all because I hadn’t reset the query when finished using it: <?php wp_reset_query(); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trying to get the blog page to work’ is closed to new replies.