The problem is that on my one pager website the title tag doesn't get populated.
page.php
looks like this:
<?php
locate_template( 'page-home.php', true );
exit();
page-home.php
looks like this:
<?php get_header(); ?>
<?php get_template_part('template-sections/slider'); ?>
<?php get_template_part('template-sections/services'); ?>
<?php //etc. ?>
<?php get_footer();
header.php
looks like this:
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="profile" href="http://gmpg.org/xfn/11"/>
<base href="<?php echo get_site_url(); ?>/">
<?php wp_head(); ?>
</head>
<body itemprop="hasPart" itemscope="" itemtype="http://schema.org/WebPage" <?php body_class(); ?>>
<!-- etc -->
And footer.php
looks like this:
<?php wp_footer(); ?>
</main>
<aside class="aside">
<div class="aside__content">
</div>
</aside>
</div>
</body>
</html>
Yes. There is a page present called home
in the backend. And I would like Wordpress to pick that title up and use it as a title tag in header.php
.
Now as far as I know, Wordpress normally automatically populates the title tag. So what's the problem here? Thanks!
PS: I am not using the wp_title
filter anywhere in my custom Wordpress theme.