• Resolved panther8

    (@panther8)


    Hello WordPress community,

    I am having a minor issue that I cannot solve. Unfortunately, my search on the Internet and this forum yielded no results.

    Basically, what I want to do is to include a Facebook like button right in the middle of a post/page. To accomplish this I add the following code within the text editor:

    <div style=”text-align: center;”><div class=”fb-like” data-href=”http://www.URL.com&#8221; data-layout=”button_count” data-action=”like” data-show-faces=”true” data-share=”true”></div></div>

    or

    <div style=”text-align: center;”>
    <div class=”fb-like” data-href=”http://www.URL.com&#8221; data-layout=”button_count” data-action=”like” data-show-faces=”true” data-share=”true”></div>
    </div>

    After publishing the page looks fine and the button displays. However, after making an update the bottom vanishes and the following line of code is left:

    <div style=”text-align: center;”></div>

    I simply cannot find a solution to this problem, so I would be very grateful if anyone could point me in the right direction. Thank you so much!

Viewing 1 replies (of 1 total)
  • Thread Starter panther8

    (@panther8)

    I think I found a solution. All you need to do is to wrap the code into code tags and it will not get deleted.

    It should look like this:

    <code ><div style=”text-align: center;”><div class=”fb-like” data-href=”http://www.URL.com/&#8221; data-layout=”button_count” data-action=”like” data-show-faces=”true” data-share=”true”></div></div><
    /code>

    I have inserted one space after the code, otherwise the tag does not display. You have to remove the space in order for it to work.

Viewing 1 replies (of 1 total)

The topic ‘Facebook like button within post vanishes’ is closed to new replies.