I have searched in many forum sites how to change the title of every page.
Am new to Seo and having a php site to take care.
in Header file my title is xyz
where are the pages has the same tile.
How to change this. Can someone help.
i tried with <title><?php echo $page-title; ?></title>
after this home page show 0 in the title
still going further i tried to implement in index and about page with the code $page-Title="Home";
I would expect this to work, given that $page-title has been defined.
But here you have $page-Title="About-Us"; with a capital T on the word Tile. Where you echo you use a lower case t.
Variable names are case sensitive.
I would expect this to work, given that $page-title has been defined.
But here you have $page-Title=“About-Us”; with a capital T on the word Tile. Where you echo you use a lower case t.
Variable names are case sensitive.
I tried with it, But it display error while typing in file. or still can go further.
<?php echo $page-title; ?>
This do i have to type in every page or only in 1 page.
Is there i have to give any name for this file in header.php
It depends on how your pages are created. For example you may have a database containing the descriptions for the pages or items included in the pages.
Or if it’s a few pages set up manually it can be done just like you did the title:- $description = "Some text describing this page on my web site." ;
If you mean keywords for the “keywords” meta-tag, don’t waste your time, crawlers don’t even look at that any more, have not done for many years.
Crawlers don’t look at the “keywords” metatag so you may leave it out.
But the “description” is still important for SEO because it is often what people see in SERPs, so it needs to tell people it’s the page they are looking for, so they click it.
You may call the variable anything you like, within the bounds of naming rules as mentioned in post #4. $pagedescription seems like a good descriptive name for the variable.