WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Simple Facebook Connect] Share button adds content (6 posts)

  1. enseignement
    Member
    Posted 4 years ago #

    Hi Otto,

    When I try to add the share plugin, here's what comes in the head section.

    <span class='postmetadata'><a href="http://www.enseignons.be/actualites/category/politique/" title="Voir tous les articles dans Politique" rel="category tag">Politique</a></span><meta name="title" content="Et si le calendrier scolaire respectait les rythmes de vie de l’enfant?" />
    <meta name="description" content="<p>Ce w-e, nous avons publi&Atilde;&copy; le calendrier scolaire 2010-2011 tel qu’il a &Atilde;&copy;t&Atilde;&copy; &Atilde;&copy;tabli et approuv&Atilde;&copy; par le gouvernement de la Communaut&Atilde;&copy; fran&Atilde;&sect;aise. Tr&Atilde;&uml;s vite, les r&Atilde;&copy;actions ont afflu&Atilde;&copy; sur le site et sur notre page Facebook : &laquo;&nbsp;&Atilde;´┐Ża va &Atilde;&ordf;tre dur dur entre No&Atilde;&laquo;l et carnaval! C’est long et tr&Atilde;&uml;s mal adapt&Atilde;&copy;, nous dit cet enseignant. Quand donc nos <a href=&quot;http://www.enseignons.be/actualites/2010/02/15/calendrier-scolaire-respectait-rythmes-vie-enfant/&quot;>[...]</a>" />
    <meta name="medium" content="blog" />

    Which means that I have now a link on top of all my content. How can I manage that ?
    And the fb:share, although present in the code, is not shown on the post.

    What can I do ?
    Thanks for your help ?

    http://wordpress.org/extend/plugins/simple-facebook-connect/

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    You have some other plugin that is doing something wrong. The share plugin uses get_the_content and get_the_excerpt to get the post content. A surprising lot of other plugins wrongly create output when these functions are called.

    Find the plugin creating that link, and remove it.

  3. enseignement
    Member
    Posted 4 years ago #

    Hi,

    Unfortunately, I disabled all my plugins, and it seems that this link is still created, only when I activated the sfc share plugin.

    Any idea how I could solve it ?

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    No, I can't fix it, and I can't tell you exactly how to fix it. The best I can do is tell you where to look for it.

    See, the link is created when you activate the share button plugin because the share button is what is calling get_the_content and get_the_excerpt.

    However, the share button plugin is NOT creating that link. It's just triggering something else to do it. Whatever is generating that link is generating it wrongly, causing the problem. It's getting triggered when it's not supposed to.

    Maybe it's your theme doing it. I don't know. I cannot tell you where the link comes from. I know what causes it, and I know why it appears with the share button, but it is not an actual problem with the share button itself. The share button code does not create the link, it's just triggering it to happen.

    Judging from the link, it looks like you have something in another plugin or a theme trying to automatically create a category tag at the beginning of every post. That's what is causing the problem.

  5. enseignement
    Member
    Posted 4 years ago #

    OK - Got it.
    One more problem :
    In some posts, the number of share posts on Facebook appears twice. Do you know why ??
    http://www.enseignons.be/actualites/2010/02/13/calendrier-vacances-scolaires-2010-2011/

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    I've seen the double shared item count problem on many different sites, mine included. It's a problem with Facebook's own code. It doesn't always happen, but it does happen sometimes.

    Nothing I can do about it, it appears to occur randomly.

Topic Closed

This topic has been closed to new replies.

About this Topic