S K
S K

Reputation: 96

My wordpress homepage is not showing proper title

In my wordpress site I set my homepage to be my latest posts and when it gets loaded title doesn't show like "Home - SiteName" but only " - SiteName".

How to fix this. I want to add Static "Home" in front or after "- SiteName"

Note: 1. I tried to check my home.php file but it is not there. 2. When I am saying "title" I mean the name or description shows in browser's tab.

Thanks

Upvotes: 0

Views: 1398

Answers (2)

Jon
Jon

Reputation: 6541

You can add code like this to your header.php

    <title><?php
    if (is_front_page()) {echo ' My wonderful Page title in here ';}
    else {echo wp_title('');}
    ?>
    </title>

It will put the echo text as your homepage title, and the post/page title as the title for the other pages. Other WordPress code can be added into the php if you want something more comprehensive

Upvotes: 0

user6864832
user6864832

Reputation:

hi you can add this plugin and customize the TITLE as your requirement https://wordpress.org/plugins/custom-title/screenshots/ thanks

Upvotes: 0

Related Questions