tried copying across all the missing theme files from the twentyfourteen theme
it should be enough to add an index.php or home.php ( http://codex.wordpress.org/Template_Hierarchy#Home_Page_display ) file with a loop, and then set either the front page or any other page as the ‘posts page’; http://codex.wordpress.org/Creating_a_Static_Front_Page
does your theme have an index.php?
what is the code of that?
I’ve tried adding the home.php but it doesn’t seem to do anything.
The index.php of my theme is as follows:
<?php
/**
* @package WordPress
* @subpackage Emotion Studios
*/
get_header(); ?>
<div id="page-wrapper">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php if ( is_front_page() ) { ?>
<!-- homepage layout code goes here -->
<?php the_content('Read the rest of this entry »'); ?>
<div id="main">
<?php } else { ?>
<!-- default page layout code goes here -->
<!-- this is secondary navigation code for sub-pages within a section -->
<?php
if($post->post_parent)
$children = wp_list_pages("exclude=100,101,102,311,318,315&title_li=&child_of=".$post->post_parent."&echo=0");
else
$children = wp_list_pages("exclude=100,101,102,311,318,315&title_li=&child_of=".$post->ID."&echo=0");
if ($children) { ?>
<div id="main">
<?php the_content('Read the rest of this entry »'); ?>
<div id="column2">
<h2>Buy an Emotion Studios Shoot</h2>
<img class="shoot" src="http://www.emotionstudios.co.uk/wordpress/wp-content/themes/emotion/images/buy-emo.jpg" alt="Emotion Studios" />
<p>If you would like to book a photoshoot you can make a secure payment using the PayPal button below.</p>
<a href="http://www.emotionstudios.co.uk/photography-shoots/buy-a-shoot/"><img class="buy" src="http://www.emotionstudios.co.uk/wordpress/wp-content/themes/emotion/images/pay-pal-btn.png" alt="Buy Now" description="#" /></a>
<br />
<h6 class="dashed-divider"></h6>
<h2>Call us now to book your shoot</h2>
<h2 class="call"><a href="callto:01746 710 128">+44 (0) 1746 710 128</a></h2>
<h6 class="dashed-divider"></h6>
<h2>Testimonials</h2>
<?php get_sidebar( 'content' ); ?>
</div>
</div>
<?php } else { ?>
<div class="main">
<?php the_content('Read the rest of this entry »'); ?>
<div id="column2">
<h2>Buy an Emotion Studios Shoot</h2>
<img class="shoot" src="http://www.emotionstudios.co.uk/wordpress/wp-content/themes/emotion/images/buy-emo.jpg" alt="Emotion Studios" />
<p>If you would like to book a photoshoot you can make a secure payment using the PayPal button below.</p>
<a href="http://www.emotionstudios.co.uk/photography-shoots/buy-a-shoot/"><img class="buy" src="http://www.emotionstudios.co.uk/wordpress/wp-content/themes/emotion/images/pay-pal-btn.png" alt="Buy Now" description="#" /></a>
<h6 class="dashed-divider"></h6>
<h2>Call us now to book your shoot</h2>
<h2 class="call"><a href="callto:01746 710 128">+44 (0) 1746 710 128</a></h2>
<h6 class="dashed-divider"></h6>
<h2>Testimonials</h2>
<?php get_sidebar( 'content' ); ?>
</div>
</div>
<?php } ?>
<?php } ?>
<?php endwhile; ?>
<?php else : ?>
<h1>Oops!</h1>
<p>We couldn't find the page you're looking for. Why not start again at the <a href="/">homepage</a>.</p>
<?php endif; ?>
</div><!-- close page wrapper -->
</div><!-- close main -->
<?php get_footer(); ?>
and the home.php is as follows:
<?php
/**
* @package WordPress
* @subpackage Emotion Studios
*/
get_header(); ?>
<div id="page-wrapper">
<?php
if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
// Include the featured content template.
get_template_part( 'featured-content' );
}
?>
<div id="main">
<?php
if ( have_posts() ) :
// Start the Loop.
while ( have_posts() ) : the_post();
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
endwhile;
// Previous/next post navigation.
twentyfourteen_paging_nav();
else :
// If no content, include the "No posts found" template.
get_template_part( 'content', 'none' );
endif;
?>
</div><!-- #main -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #page wrapper -->
<?php
get_footer();?>
I have a static page ‘Blog’ assigned as the blog page, but it is just using the default template at the moment.
Is there anything glaringly wrong with the code?