0
私は3つのgoogle +1ボタンを同じwordpressページに持っています。しかし、exclamation mark
を表示してクリックしたときにそのうちの1つが失敗します。 +1 button is unavailable or has stopped working.私が説明した考えられる理由のいずれも発生しないことをかなり確信している:クリックが再び次のページが開かれた+1ボタンが利用できない、または動作しなくなった
。
両方のコードは実質的に同じである:
// float code (malfunction)
<div id="float_plusone">
<g:plusone size="tall" href="<?php echo urlencode(get_permalink()); ?>" count="true"></g:plusone>
</div>
<script type="text/javascript">
(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>
// above/below posts code (works)
<script type="text/javascript">
(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>
<g:plusone size="medium" callback="googleplus_click"></g:plusone>
について任意の提案は大歓迎です。
+1私は 'href =" <?php echo urlencode(get_permalink());?> "'を完全に削除しました。今働いている。ありがとう! –