Hallo Profis,
ich habe in meine single.php (Arras Theme) bereits Facebook erfolgreich eingefügt und nun möchte ich auch noch meine Google Plus Seite einbinden. Eigentlich kein Problem. Nur wenn ich den Google Code in die single.php einbinde, erscheint zwar Google Badge im Chrome und Firefox richtig allerding wird im Opera und IE das Design total verschoben angezeigt.
So schaut meine single.php jetzt aus:
<?php get_header(); ?>
<div id="content" class="section">
<?php arras_above_content() ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php arras_above_post() ?>
<div id="post-<?php the_ID() ?>" <?php arras_single_post_class() ?>>
<?php arras_postheader() ?>
<div class="entry-content clearfix">
<?php the_content( __('<p>Read the rest of this entry »</p>', 'arras') ); ?>
<?php wp_link_pages(array('before' => __('<p><strong>Pages:</strong> ', 'arras'),
'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
<?php arras_postfooter() ?>
<?php
if ( arras_get_option('display_author') ) {
arras_post_aboutauthor();
}
?>
</div>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/de_DE/all.js#xfbml=1&appId=240201658531";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like-box" data-href="http://www.facebook.com/pages/facebookseite/ID" data-width="650" data-height="200" data-show-faces="true" data-stream="false" data-header="false"></div>
<?php arras_below_post() ?>
<a name="comments"></a>
<?php comments_template('', true); ?>
<?php arras_below_comments() ?>
<?php endwhile; else: ?>
<?php arras_post_notfound() ?>
<?php endif; ?>
<?php arras_below_content() ?>
</div><!-- #content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Alles anzeigen
Wie gesagt bis hier ist alles perfekt. Jetztz füge ich unter dem Facebook Code diesen Google Plus Badge Code ein:
<!-- Place this tag in the <head> of your document -->
<link href="https://plus.google.com/Google-ID" rel="publisher" /><script type="text/javascript">
window.___gcfg = {lang: 'de'};
(function()
{var po = document.createElement("script");
po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(po, s);
})();</script>
<!-- Place this tag where you want the badge to render -->
<g:plus href="https://plus.google.com/Google-ID" width="650" height="131" theme="light"></g:plus>
Alles anzeigen
Leider mit dem Ergebnis, das es im Opera und IE verschoben angezeigt wird mit dem FF und Chrome aber so wie er erscheinen soll.
Da ich selber von PHP keine Ahnung habe, wollte ich die Profis hier mal fragen, wie ich das Prolem lösen könnte.
Gruß
Hount