Attempting to create custom “post” template, getting a 500 internal server error

I’ve been following this tutorial:

To create a custom template for “post”-type webpages. The tutorial calls for copying the contents of single.php into a blank sheet in which I define a template name (in this case it’s “Series”).

I have successfully made it appear as a selectable option in the “Post Attributes” section of the “Edit Post” screen, but when I select it and preview the post I’m met with a 500 internal server error.

At first I thought it was due to some type of php syntax, but after cleaning up opening and closing tags I don’t see wh

I am using the HTML5 blank theme. Code below:

* Template Name: Series
* Template Post Type: post, page, product


<div id=”primary” class=”content-area”>
<main id=”main” class=”site-main” role=”main”>

// 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 content-___.php
* (where ___ is the post format) and that will be used instead.
get_template_part( ‘content’, get_post_format() );

// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :

// Previous/next post navigation.
the_post_navigation( array(
‘next_text’ => ‘<span class=”meta-nav” aria-hidden=”true”>’ . __( ‘Next’, ‘twentyfifteen’ ) . ‘</span> ‘ .
‘<span class=”screen-reader-text”>’ . __( ‘Next post:’, ‘twentyfifteen’ ) . ‘</span> ‘ .
‘<span class=”post-title”>%title</span>’,
‘prev_text’ => ‘<span class=”meta-nav” aria-hidden=”true”>’ . __( ‘Previous’, ‘twentyfifteen’ ) . ‘</span> ‘ .
‘<span class=”screen-reader-text”>’ . __( ‘Previous post:’, ‘twentyfifteen’ ) . ‘</span> ‘ .
‘<span class=”post-title”>%title</span>’
) );

// End the loop.

</main><!– .site-main –>
</div><!– .content-area –>

<?php get_footer(); ?>

Read more here:: Attempting to create custom “post” template, getting a 500 internal server error

Leave a Reply

Your email address will not be published. Required fields are marked *