I'm creating a custom theme in Wordpress 4.1. When trying go to a page that is not the home or portfolio (which have their custom pages), it should load page.php. But instead I get the index.
No plugins cause a change in this, as I tried to disable all and then retry. No change.
My page.php is a very simple one, taking example from the twentyfifteen theme:
<?php get_header() ?> <?php // Start the loop. while ( have_posts() ) : the_post(); // Include the page content template. get_template_part( 'content', 'page' ); // End the loop. endwhile; ?> <?php get_footer() ?>
I read at places that I need to put
if(have_posts()) before the loop, but there is none in the default theme, so I don't see why I'd need that.
I also copied the code from page.php into index.php, which display nothing except the header.php and footer.php pages.
I'm quite new to Wordpress as well, so that doesn't quite help either.
Could anyone tell me why the page doesn't load as I would want it to?