2020 Child: Moving H1 on Home Only, which file(s) to edit
-
A student of mine asked me this question and I am stuck with half an answer.
So far this works:
1. Duplicate singular.php (a default page template) and rename it front-page.php in your child theme. WP always loads front-page.php if it finds one. It has precedence.
2. Duplicate header.php and call it header-home.php
3. Insert this code to call up the title wherever you like:
<?php echo the_title( ‘<h1 class=”entry-title”>’, ‘</h1>’ ); ?>4. In front-page.php edit the get_header(); to get_header(‘home’);
However, I wind up with 2 H1 tags on the home page. I cannot find which file(s) to edit in order to the remove the default H1, nor how to set it up so that it works only on the home page.
The topic ‘2020 Child: Moving H1 on Home Only, which file(s) to edit’ is closed to new replies.
