Fixing the blog page title in WP

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() ): ?>

Examples:

<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>
Isaac Adams-Hands

Full Stack Developer, Digital Marketer, and InfoSec enthusiast. He received his Bachelor’s Degree from the University of Western Sydney and his Business Diploma from Georgian College before joining various marketing positions in search portals, e-commerce, higher education, and addiction recovery services.

Follow @ twitter

Related posts

CSS order

Here is how to load a WordPress child theme’s CSS after the parent theme’s CSS. The trick here is to add a 1 to the add_action script, illustrated below Functions.php Find and edit this little bit of code in the Functions.php file: This way your Parent’s CSS loads first, and your Child theme will load… Read More

HTML sitemap w/o a WP Plugin

Have you heard about HTML sitemap? Well, it offers easy navigation for your website visitors. To be more precise, it’s the bulleted outline text version of a website. The visitors can use the sitemap to easily find/locate any topic which they can’t find searching through the whole website menus. The best part is that HTML… Read More