Welcome to WebmasterServe!

FREE TO JOIN! Join us now to engage in informative and friendly discussions about Webmastering, SEO, SEM, Internet Marketing, Programming, Graphic Design, Online Jobs and more. What are you waiting for? Ready to join our friendly community? It takes just one minute to register.

Dismiss Notice

Join WebmasterServe Forums 
Join the discussion! Have a better idea or an opinion? It takes just one minute to register Click Here to Join

Help Me/Question How To Add Meta Tag In Php ?

Discussion in 'PHP Programming' started by karthikaqpt, Mar 21, 2016.

  1. karthikaqpt

    karthikaqpt New Member

    Joined:
    Dec 23, 2015
    Messages:
    11
    Ratings:
    +0 / -0
    How to add meta tag in PHP?
     
  2. PHP Assignment Help

    White Belt

    Joined:
    Sep 26, 2016
    Messages:
    36
    Ratings:
    +2 / -0
    You have to just install all in SEO plugin and activate then after put up their Meta title, description and Keyword.
     
  3. Brillmindz

    Brillmindz New Member

    Joined:
    Mar 20, 2017
    Messages:
    3
    Ratings:
    +0 / -0
    get_meta_tags

    get_meta_tags — Extracts all meta tag content attributes from a file and returns an array

    Regards
    Robert
    Brillmindz Technologies Pvt Ltd
     
  4. sinGN

    White Belt

    Joined:
    Mar 12, 2017
    Messages:
    100
    Ratings:
    +1 / -0
  5. ajsahi

    White Belt

    Joined:
    Dec 12, 2015
    Messages:
    38
    Ratings:
    +0 / -1
    i this the best option is yoast SEO plugin you can use it free as well as premium
     
  6. ajsahi

    White Belt

    Joined:
    Dec 12, 2015
    Messages:
    38
    Ratings:
    +0 / -1
    you have to use yoast SEO, i think this is the best tool to get batter SEO optimization with meta tags
     
  7. Theomax

    White Belt

    Joined:
    Jun 20, 2017
    Messages:
    21
    Ratings:
    +1 / -0
    Here is the PHP for the variables


    <?php

    $tpTitle="Helping you to improve your web site";

    $pgHeading="Site-Report.com - Helping you to improve your web site";

    $pgDesc="Helping you to improve your web site";

    $pgKeywords="site-report";

    ?>
     
  8. David Paul

    David Paul New Member

    Joined:
    Nov 21, 2018
    Messages:
    1
    Ratings:
    +0 / -0
    The major search engines recommend that each page on your site has a unique title and meta description. This can easily be achieved with php if you have data stored somewhere to populate those tags.

    In your html template you may have something like:-

    <link rel="stylesheet" type="text/css" href="css/style.css">
    <title><?php echo $title ?></title>
    <meta name="description" content="<?php echo $description ?>">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name=viewport content="width=device-width, initial-scale=1">
     

Share This Page