have a little problem. I'm currently creating a theme, where the article page is not on the home page. The trouble now is that on the home page below are three content boxes and they should not appear on the article page.
I created a blog page template (blog.php) and created a new page and inserted the blog page template there.
The blog page template references in the source to a loop (loop-blog.php) where the content to be displayed is.
Neither the blog.php or the loop-blog.php have anything from the code that is responsible for the content boxes but still I see the content boxes on the article page.
Content of blog.php:
<?php /* Template Name: Blog */ ?>
<?php get_header(); ?>
<!-- Example row of columns -->
<div class="row-fluid">
<div class="span11">
<?php if ( ! have_posts() ) : ?>
<header>
<h1>Nicht gefunden!</h1>
</header>
<p>Sorry, leider konnte der gewünschte Artikel nicht gefunden werden. Vielleicht hilft dir die suche ja weiter!</p>
<?php endif; ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'blog', 'loop-blog' ); ?>
<?php endwhile; ?>
<?php if(function_exists('wp_paginate')) {
wp_paginate();
} ?>
<hr>
</div>
</div>
<?php get_footer(); ?>
Content of the loop-blog.php
<div class="content">
<div class="page-header">
<a href="<?php the_permalink(); ?>"><h1><?php the_title(); ?></h1></a>
<br>
<p><?php the_time('j. F Y'); ?> | <?php the_author_posts_link(); ?> | Veröffentlicht unter: <?php the_category(', ') ?> | <?php comments_popup_link('keine Kommentare', '1 Kommentar', '% Kommentare', 'comments-link', 'Kommentarfunktion deaktiviert'); ?></p>
</div>
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
<?php the_excerpt(); ?>
<?php else : ?>
<?php the_content('Weiterlesen'); ?>
<?php endif; ?>
</div>
<hr>
The categories was made in the same way, and here it works as it should. The content boxes are not displayed. I'm a bit stumped here, where is the mistake?