how to add meta tag meta keyword etc

Discussion in 'Programming' started by meyaseen2003, Aug 31, 2012.

  1. #1
    hello i am download one free article directory script and install but this directory not have any meta key word meta discraption meta tags etc option in admin panel please help me how to add these options first see my directory http://goodhealthcare.info/
    Thank you
     
    meyaseen2003, Aug 31, 2012 IP
  2. sigmainfo

    sigmainfo Active Member

    Messages:
    495
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    55
    #2
    You need to add this in your source code.
     
    sigmainfo, Sep 3, 2012 IP
  3. sudhavishwakarmacis

    sudhavishwakarmacis Greenhorn

    Messages:
    24
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    23
    #3
    Add the following code:

    <head>
    <meta name="keywords" content="keyword1, keyword2,....">
    <meta name="description" content="A small description of 160-165 characters containing keywords.">
    </head>

    and you are done!
     
    sudhavishwakarmacis, Sep 4, 2012 IP
    formicin likes this.
  4. nhl4000

    nhl4000 Well-Known Member

    Messages:
    479
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    110
    #4
    If your new to programming, I would not recommend a 'copy and paste' to the answer quoted.

    In a HTML document, there is 1 head and 1 body. Within the head tags, that is where you put your meta keyword and description.

    
    <html>
    <head>
    ...
    <meta name="keywords" content="programming,help,keywords" />
    <meta name="description" content="this is where your description goes, typically seen in Google's description of your site. ie. search result" />
    ...
    </head>
    <body>
    ...
    ...
    </body>
    </html>
    
    Code (markup):
    Also note the /> at the end of the meta tags. I highly recommend adding these to the HTML tags that do not have closing tags. Such as: <img src="/image-url.jpg" title="Image" alt="Image" />
     
    nhl4000, Sep 4, 2012 IP
  5. meyaseen2003

    meyaseen2003 Member

    Messages:
    106
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #5
    thank you for your help but my script tootly in php
     
    meyaseen2003, Sep 5, 2012 IP
  6. sudhavishwakarmacis

    sudhavishwakarmacis Greenhorn

    Messages:
    24
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    23
    #6
    Look, meta tags are HTML components, not of PHP. The get_meta_tags function in php reads a HTML document and extracts meta tags out of them for you and returns an array. This function isn't responsible for setting meta tags for you. You have to write them manually in HTML.

    array get_meta_tags ( string $filename [, bool $use_include_path = false ] )


    This function parses the file named filename and parses it line-by-line to get meta tags from the file. The parsing ends at </head>.


    The code I mentioned in my previous reply is only used to set meta tags for your website.
     
    sudhavishwakarmacis, Sep 5, 2012 IP
  7. formicin

    formicin Peon

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    formicin, Sep 12, 2012 IP
  8. WEBGEEKBOY

    WEBGEEKBOY Guest

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Learn about html meta tags using w3 schools. its easy to learn
     
    WEBGEEKBOY, Sep 26, 2012 IP
  9. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #9
    The PHP either echos HTML or it has HTML in non-PHP sections of the file. That's where you'll find the <head> tag and where you'll add your <meta ...> tags.

    I suggest you learn HTML and PHP (and programming) before you try changing scripts, or you'll end up with unusable scripts. A single error in a PHP script can cause it to give you a blank page.
     
    Rukbat, Sep 30, 2012 IP
  10. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #10
    "Any kinds of language" as long as it's HTML. You can generate the HTML in any server-side language.
     
    Rukbat, Oct 6, 2012 IP