In this tutorial, I will show you how to hide the home page title on your WordPress website.
Hide the home page title in WordPress
- Log into your WordPress website.
- Click on 'Appearance'.
- Click on 'Editor'.
- Click on the link that represents page.php from the links on the right side of the screen.
- Now you can see the php code for the php script that generates the pages for your WordPress website. Replace the code:
PHP | copy code | ? 1 <h1 class="title"><?php the_title(); ?></h1>
with
PHP | copy code | ? 1 <? if(is_home){}else{ ?><h1 class="title"><?php the_title(); ?></h1><? } ?>
- Click the 'Update file' button.
Now the page title won't display on the home page. All other pages shouldn't be affected.
Note: If this script isn't working, try replacing the word 'is_home' with 'is_front_page()'.