SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    SitePoint Addict
    Join Date
    Feb 2012
    Location
    Kiwi in Bangkok
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Meta Description where/how to add it to my site ?

    I would like to add Meta Description & Meta Keywords to my site,

    http://trade-th.com/index.php

    Where to place them ?

    What php should I place them in ?

    Please could someone point me in the right direction ?

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2013
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the content attribute of <meta> tag, you can put your meta description and keywords respectively. But donít forget to add it before <head> tag. I have checked your pageís source, both meta description and keywords are empty at present.

    Here is the source link which will help to know more about how to put meta tags in webpage :

    http://support.google.com/webmasters/bin/answer.py?hl=en&answer=79812

  3. #3
    SitePoint Addict
    Join Date
    Feb 2012
    Location
    Kiwi in Bangkok
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello Melisa,

    Thank you for your reply, and link to more information, much appreciated,

    In my case I am trying to find the correct php file to place the Meta info into,

    I have been looking yet as yet have not found where, or which php to place it into ?





    Quote Originally Posted by Mellisa Smith View Post
    In the content attribute of <meta> tag, you can put your meta description and keywords respectively. But don’t forget to add it before <head> tag. I have checked your page’s source, both meta description and keywords are empty at present.

    Here is the source link which will help to know more about how to put meta tags in webpage :

    http://support.google.com/webmasters...n&answer=79812

  4. #4
    SitePoint Member peggyp's Avatar
    Join Date
    Apr 2013
    Location
    Ohio
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which CMS are you using? it will help us to provide how to find main file that can help you to manage title metas !

  5. #5
    SitePoint Addict
    Join Date
    Feb 2012
    Location
    Kiwi in Bangkok
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello peggyp,

    Thank you for your reply,

    CMS ? Ok I looked in my Admin, and in there is the Page Title, Meta Description, Meta Keywords, all areas are filed in/have content

    Yet only the Page Title shows when a site search is done, No Meta Description, No Meta Keywords.

    Now at the top of the site Admin page are the words: Important! If you enable search engine friendly URLs you will need to rename the file htaccess.txt to .htaccess. Also, make sure your server supports mod_rewrite. You might need to change some settings in the .htaccess file, so read the comments inside the file if it does not work by default.

    My .htaccess file is:

    <IfModule mod_deflate.c>
    # DEFLATE by type - html, text, css, xml
    AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml

    # DEFLATE by type - javascript
    AddOutputFilterByType DEFLATE application/x-javascript application/javascript text/javascript text/x-js text/x-javascript

    # DEFLATE by extension
    AddOutputFilter DEFLATE js css htm html xml
    </IfModule>


    ## Uncomment this if FollowSymLinks is not already enabled on your server
    #Options +FollowSymLinks

    RewriteEngine On
    RewriteBase /
    RewriteCond % ^www.trade-th.com.com [NC]
    RewriteRule ^(.*)$ http://trade-th.com/$1 [L,R=301]


    ## Use mod rewrite
    ## Comment the line below if RewriteEngine not already enabled on your server


    ## Uncomment the line below and change the path if your script is installed
    ## in a different path than the root folder of your domain


    RewriteRule ^index.html index.php [nc]
    RewriteRule ^recent_ads.html recent_ads.php [nc]
    RewriteRule ^register.html register.php [nc]
    RewriteRule ^pre-register.html pre-register.php [nc]
    RewriteRule ^login.html login.php [nc]
    RewriteRule ^logout.html logout.php [nc]
    RewriteRule ^favorites.html favorites.php [nc]
    RewriteRule ^contact.html contact.php [nc]
    RewriteRule ^listings.html listings.php [nc]
    RewriteRule ^pre-submit.html pre-submit.php [nc]
    RewriteRule ^([0-9]+)-([^\/]+)?/content.html$ content.php?id=$1 [nc,qsa]
    RewriteRule ^([0-9]+)-([^\/]+)?/index.html$ index.php?category=$1 [nc,qsa]
    RewriteRule ^([0-9]+)-([^\/]+)?/details.html$ details.php?id=$1 [nc,qsa]
    RewriteRule ^([^\/]+)/([^\/]+)/([^\/]+)/recent_ads.html$ recent_ads.php?page=$1&order=$2&order_way=$3 [nc,qsa]
    RewriteRule ^([0-9]+)-([^\/]+)?/user_listings.html$ user_listings.php?id=$1 [nc,qsa]
    RewriteRule ^([0-9]+)-([^\/]+)?/([^\/]+)/([^\/]+)/([^\/]+)/user_listings.html$ user_listings.php?id=$1&page=$3&order=$4&order_way=$5 [nc,qsa]
    RewriteRule ^([^\/]+)/([^\/]+)/([^\/]+)/favorites.html$ favorites.php?page=$1&order=$2&order_way=$3 [nc,qsa]
    RewriteRule ^([0-9]+)-([^\/]+)?/store.html$ store.php?id=$1 [nc,qsa]
    RewriteRule ^([0-9]+)-([^\/]+)?/([^\/]+)/([^\/]+)/([^\/]+)/store.html$ store.php?id=$1&page=$3&order=$4&order_way=$5 [nc,qsa]

    ## Uncomment the following line when activating location subdomains
    ## Don't forget to replace yourdomainname.com with your own domain name !

    #RewriteCond %{HTTP_HOST} !www.trade-th.com$ [NC]
    #RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-_]+).trade-th.com [NC]
    #RewriteRule (.*) %{SCRIPT_FILENAME}?crt_city=%2 [NC,QSA]

    RewriteCond %{REQUEST_URL} ^(.*)(/listings.html)(.*)$ [NC]
    RewriteCond %{SCRIPT_FILENAME} !-f
    RewriteCond %{SCRIPT_FILENAME} !-d
    RewriteRule (.*) ./listings.php?$1

    Quote Originally Posted by peggyp View Post
    Which CMS are you using? it will help us to provide how to find main file that can help you to manage title metas !

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,204
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by RayWilk View Post
    CMS?
    A CMS is a "content management system". It basically means a bunch of files working in the background to power you admin interface, connect with a database and produce all the pages on your site. You may or may not have one of those running in the background, but it sounds like you do.

    Anyhow, you'll need to dig into these files and find where your templates are located. Is there a raw HTML file for each page? If so, what do you see in the head section? We need more information on your site's setup.

  7. #7
    SitePoint Addict
    Join Date
    Feb 2012
    Location
    Kiwi in Bangkok
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello ralp.m, thank you for your reply, it helped as I looked for HTML files, and found this:

    As I wrote earlier the Title works, but the Meta do not.

    <head>
    <title>{$page_info.title}</title>
    <meta http-equiv="Content-Type" content="text/html; charset={$appearance.charset}" />
    <meta name="description" content="{$page_info.meta_description}" />
    <meta name="keywords" content="{$page_info.meta_keywords}" />
    <meta name="robots" content="index, follow" />

    Quote Originally Posted by ralph.m View Post
    A CMS is a "content management system". It basically means a bunch of files working in the background to power you admin interface, connect with a database and produce all the pages on your site. You may or may not have one of those running in the background, but it sounds like you do.

    Anyhow, you'll need to dig into these files and find where your templates are located. Is there a raw HTML file for each page? If so, what do you see in the head section? We need more information on your site's setup.

  8. #8
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,204
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Code:
    <meta name="description" content="{$page_info.meta_description}" />
    OK, that indicates that somewhere in your backend/admin area there's a place to enter content for your meta elements—presumably where you enter content for each page. Where that is, however, depends on how your site is coded. If you don't know how it works, you may have to ask the person who built it for you.

  9. #9
    SitePoint Addict
    Join Date
    Feb 2012
    Location
    Kiwi in Bangkok
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello ralp.m

    yes I agree with you, and yes I know that place in the backend/admin, and I have each section completed/filled in with type.

    but only the Title appears/works.

    the meta description and keywords do not, so I wondered if the problem was in this code below?

    <head>
    <title>{$page_info.title}</title>
    <meta http-equiv="Content-Type" content="text/html; charset={$appearance.charset}" />
    <meta name="description" content="{$page_info.meta_description}" />
    <meta name="keywords" content="{$page_info.meta_keywords}" />
    <meta name="robots" content="index, follow" />

    Quote Originally Posted by ralph.m View Post
    Code:
    <meta name="description" content="{$page_info.meta_description}" />
    OK, that indicates that somewhere in your backend/admin area there's a place to enter content for your meta elements—presumably where you enter content for each page. Where that is, however, depends on how your site is coded. If you don't know how it works, you may have to ask the person who built it for you.

  10. #10
    SitePoint Addict
    Join Date
    Feb 2012
    Location
    Kiwi in Bangkok
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello to all who replied,

    Thank you for all your assistance

    I corrected the problem by directly replacing the code with words.

    <meta name="description" content="{$page_info.meta_description}" />
    <meta name="keywords" content="{$page_info.meta_keywords}" />

    <meta name="description" content="words placed in here" />
    <meta name="keywords" content="words placed in here" />

  11. #11
    SitePoint Member
    Join Date
    Jun 2013
    Location
    Calgary
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Meta Description & Meta Keywords are placed in the header section of your page..

    <meta name="description" content="Story about my dog
    giving birth to puppies." />
    <meta name="keywords" content="stories, tales, harriet, smith,
    harriet smith, storytelling, day, life, dog, birth, puppies, happy" />

  12. #12
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,204
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by RayWilk View Post
    I corrected the problem by directly replacing the code with words.
    That's fine if your pages are static, but if your pages are dynamically generated, you will end up with the same description on each page, which isn't so useful.

  13. #13
    SitePoint Member peggyp's Avatar
    Join Date
    Apr 2013
    Location
    Ohio
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are using CMS like joomla, drupal..it will have some set of rules and pages which can be implemented easily. Have you built this website with custom development methods or used any readymade content management modules?

  14. #14
    SitePoint Addict
    Join Date
    Feb 2012
    Location
    Kiwi in Bangkok
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello ralph.m, yes I understand what you are saying, I think it will be ok, yet will do some page checks, thank you

    Quote Originally Posted by ralph.m View Post
    That's fine if your pages are static, but if your pages are dynamically generated, you will end up with the same description on each page, which isn't so useful.

  15. #15
    SitePoint Addict
    Join Date
    Feb 2012
    Location
    Kiwi in Bangkok
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello peggyp, thank you for your reply, I am using a script completely created, with all options within it, yet it seemed that the Meta was not working

    Quote Originally Posted by peggyp View Post
    If you are using CMS like joomla, drupal..it will have some set of rules and pages which can be implemented easily. Have you built this website with custom development methods or used any readymade content management modules?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •