Where can I insert this code?

Discussion in 'WordPress' started by Divvy, Oct 21, 2011.

  1. #1
    Hello guys,

    Im trying to make this facebook trick in my blog:
    http://capturingyourmarket.com/social-media/customize-your-business-facebook-page/

    But dont know where I can add the code below in my theme:

    I know that I need to insert at header.php but my theme is a little different. Im using a theme called "Gallery" (theme by UpThemes) that are working with the Thematic child theme. Can someone help me with that please?

    Another option is to edit a social plugin that I have installed in my blog called Tweet, Like, Google +1 and Share.
    In that plugin file tweet-like-plusone.php I have this code that appears beteween the <head> and </head:

    if(is_single() || is_page()) {
    ?>
        <meta property="og:type" content="article" />
        <meta property="og:title" content="<?php single_post_title(''); ?> | www.estapessoa.com" />
        <meta property="og:description" content="Se pensas o mesmo, clica em PARTILHAR para colocares no teu mural e mostrar aos teus amigos! Visita a nossa página e clica em GOSTO para ficares a par das frases do momento: http://www.facebook.com/estapessoa" />
        <meta property="og:url" content="<?php the_permalink(); ?>"/>
        <?php if(trim($thumb)!=''){ ?>
            <meta property="og:image" content="<?php echo $thumb; ?>" />
        <?php } ?>
    <?php  } else { ?>
        <meta property="og:type" content="article" />
          <meta property="og:title" content="<?php bloginfo('name'); ?>" />
        <meta property="og:url" content="<?php bloginfo('url'); ?>"/>
        <meta property="og:description" content="Se pensas o mesmo, clica em PARTILHAR para colocares no teu mural e mostrar aos teus amigos! Visita a nossa página e clica em GOSTO para ficares a par das frases do momento: http://www.facebook.com/estapessoa" />
        <?php if(trim($default_img)!=''){ ?>
            <meta property="og:image" content="<?php echo $default_img; ?>" />
        <?php } ?>
    <?php  }
    
    }
    Code (markup):
    But dont know where I need to put the code...
     
    Divvy, Oct 21, 2011 IP
  2. Divvy

    Divvy Well-Known Member

    Messages:
    785
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #2
    Already found the </head> in the thematic theme and added the code above.
    Is working and grab the image correctly, but the trick didn't work :(
    Does anyone confirm that? Anyone use or test this trick?
     
    Divvy, Oct 21, 2011 IP