Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

i want to add Meta Keyword, Description, Title and many more in My php site, how i can do that?

My site name is https://pay2write.com/index.php now problem is that i didn't describe anything in detail, likw meta & title, how i can do that?

Second, when i search in Google "pay2write" i see may results but results are not organised means, result are not in group of my pages, like other sites have, even teamtreehouse have too...

4 Answers

Jeremy Germenis
Jeremy Germenis
29,854 Points

A grouping of your pages on a search result are called sitelinks. Google automatically creates these for you. Here is more information on that subject: https://support.google.com/webmasters/answer/47334?hl=en You can try to set priorities in your sitemap.xml file to get googe to create these with the priorities tag. Here is more information on that: http://www.sitemaps.org/protocol.html

<url>
<loc>http://www.example.com/contact.php</loc>
<changefreq>monthly</changefreq>
<priority>0.9</priority>
</url>

You are already have a page title on your page with the < title > tags. There is no meta title tag.

You have the meta description tag on your site in the head <meta name="description" content=""> but you left the content="" attribute blank. This is where the description goes.

I would not add the meta keyword tag because it is not used. But if you would like to, add it under the meta description tag in the head. <meta name="keywords" content="HTML,CSS,XML,JavaScript">

thanks for your information i know that on my site there is attr"" for Description but i can't find them on my server.

Jeremy Germenis
Jeremy Germenis
29,854 Points

Are you using a custom content management system or an open source one?

custom...

Jeremy Germenis
Jeremy Germenis
29,854 Points

I would write a description for each of your pages ( home, categories, about us, ect... ) Heres a article: http://blog.hubspot.com/marketing/how-to-write-meta-description-ht. For the blog pages I would use php to generate a description from article title from your database.