WordPress.org

Ready to get started?Download WordPress

Forums

Meta Tags not working with Facebook share (5 posts)

  1. designinfantry
    Member
    Posted 4 years ago #

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="title" content="<?php bloginfo('title'); ?>">
    <meta name="description" content="TESTSEE">

    The above code is in my header.php But it does not show no matter what when I share http://www.nullweknow.com in facebook. The blog title have been set in the settings already.

  2. designinfantry
    Member
    Posted 4 years ago #

    I am able to pull my meta tags correctly from http://www.submitexpress.com/analyzer/ but not on facebook. Why is this so.

  3. designinfantry
    Member
    Posted 4 years ago #

    It seems something is replacing my meta tags with my URL...

  4. mattloak
    Member
    Posted 4 years ago #

  5. mattloak
    Member
    Posted 4 years ago #

    Fixed it by changing my doctype. It used to read:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    For some reason this caused a problem with the Facebook Share button picking up the title and the description.

    I changed it to:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    and it works now.

Topic Closed

This topic has been closed to new replies.

About this Topic