Fixing the blog page title in WP

by

If your blog page is pulling the title of the last/latest post, here is a quick and dirty fix:

Add this to your title tags:

<?php elseif ( is_home() ): ?>

Example:

<div class="container">
<?php if( is_page() ): ?>
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<?php elseif ( is_single() ): ?>
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<?php elseif ( is_home() ): ?>
<h1 class="entry-title white">Resources</h1>
<?php endif; ?>
</div>

Leave a Reply

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


PageLines