1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Facebook button in wordpress post + hidden content

Discussion in 'Web Design' started by sqallpl, Aug 25, 2010.

  1. sqallpl

    sqallpl Registered Member

    Mar 6, 2009
    Likes Received:
    I need to have a method to use a Facebook Like button inside the post with hidden content.

    This should look like this:

    User see the like button and the information that he needs to click it to see whole post

    User clicks like button

    Hidden part of the post (text, graphics, javascript) is unveiled

    I know that its possible with html and javascript, but I dont know how to use it with wordpress.

    Is there any other way without using a javascript? Im asking because wordpress has some problems with javascrit and its not easy.
  2. likeskoolaid

    likeskoolaid Regular Member

    Dec 27, 2009
    Likes Received:
    you need javascript to my knowledge.

    you could use a <php> include on your blog and have the javascript it links to, on another page of your server.

    <?php include 'folder/javascript.js';?>

    then the javascript code would be on your blog, and you could just add the html code wherever you want the like button and hidden .div to show up.

    also maybe the reason the javascript isn't working is because you're not putting it in the <head></head> tags, that's where it should go to work properly. you can't just insert it into a blog post because it would be going inside the <body></body>
    Last edited: Aug 25, 2010
  3. Ravingace

    Ravingace Registered Member

    Jan 30, 2009
    Likes Received:
    I made a post about hiding wordpress content a few months ago. I'm not allowed to post the url so here it is. I've also had to remove all urls from the post because I'm now not allowed to post them so will have to use google to search for the plugins.

    Not quite what you were looking for but it is a workaround.