WordPress.org

Ready to get started?Download WordPress

Forums

Facebook compatible meta tags (4 posts)

  1. bsolah
    Member
    Posted 4 years ago #

    This is an ongoing issue I've been having with adding meta tags to my template that displays the correct title, blurb and picture when sharing single blog posts through Facebook.

    This is the code in the header.php file.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    	<title><?php wp_title(' '); ?><?php if(wp_title(' ', false)) { echo ' - '; } ?><?php bloginfo('name'); ?></title>
    <meta property="og:title" content="<?php the_title(); ?>"/>
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    	<link rel="shortcut icon" href="" type="image" />
    	<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    	<?php
    	global $options;
    	foreach ($options as $value) {
    	if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; }
    	else { $$value['id'] = stripslashes(get_settings( $value['id'] )); }
    	} ?>
    	<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    	<?php wp_head(); ?>
    </head>
  2. bsolah
    Member
    Posted 4 years ago #

    At the moment, the title is coming up as just the post title, without the blog title and the blurb is including the post title, which is a development considering it used to just show my bio text from the sidebar.

    And it's displaying multiple pictures.

  3. bsolah
    Member
    Posted 4 years ago #

    Hello?! Can no one help me?

  4. ipholio
    Member
    Posted 4 years ago #

    I'm having the same issue, did you ever figure this problem out?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags