homepage Welcome to WebmasterWorld Guest from 54.196.18.51
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Content Management
Forum Library, Charter, Moderators: ergophobe

Content Management Forum

    
Inserting meta tags in wordpress posts
Trouble inserting meta tags in wordpress posts shared on facebook
pranavc




msg:4233846
 10:23 pm on Nov 22, 2010 (gmt 0)

Hello All,
I have been struggling with a wordpress blog related issue for a while. I like to share individual blog posts that I created via wordpress on my facebook profile. Unfortunately, when I do that, the name of the link is the name of my blog as opposed to the title of the post. I got the impression I need to modify the header.php file associated with my wordpress theme. I am not sure what to modify in it though. This is what my header.php file looks like as of now:

<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/
?>
<!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" <?php language_attributes(); ?>>


<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php wp_title(); ?>; charset=<?php bloginfo('charset'); ?>" />

<title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

<style type="text/css" media="screen">

<?php
// Checks to see whether it needs a sidebar or not
if ( empty($withcomments) && !is_single() ) {
?>
#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg-<?php bloginfo('text_direction'); ?>.jpg") repeat-y top; border: none; }
<?php } else { // No sidebar ?>
#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
<?php } ?>

</style>

<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>

<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page">


<div id="header" role="banner">
<div id="headerimg">
<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div class="description"><?php bloginfo('description'); ?></div>
</div>
</div>
<hr />

What changes do I need to make to the code above? Furthermore, is there anything else I need to modify to obtain my desired result. Responses to my post will be highly appreciated. Thank you in advance.

Regards,

Pranav

 

ergophobe




msg:4234081
 4:30 pm on Nov 23, 2010 (gmt 0)

It looks like you're showing "post title >> blog name" as your title. Not sure why FB doesn't just use that.

pranavc




msg:4234088
 4:42 pm on Nov 23, 2010 (gmt 0)

so my settings are correct as they are right now?

ergophobe




msg:4234693
 10:33 pm on Nov 24, 2010 (gmt 0)

They seem so to me, but as I say, I would need to do a test to figure out how FB pulls data and what data gets privileged. What happens if you take the site name out of your <title> tag entirely?

rahulsingh




msg:4236203
 11:40 am on Nov 29, 2010 (gmt 0)

Inserting meta tag in word press post...u can do easily with All in SEo plug in that will come free of cost install the plug in and create every page unique with title, meta tag desc and keywords ......

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Content Management
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved