Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Must "Like" & "Follow" To See Content? WordPress


Does anyone know how they do those 1 page marketing sites where you have to <strong>BOTH</strong> like the Facebook page and follow a Twitter account to unlock the content on the page?

It would also be nice if you did "unlike" the page or "unfollow" the Twitter account, you would loose access to the content, again.

Is there a php script or jquery script that does that?

Anyone have any insight on these type of social pages?

Answers (1)


Pippin Williamson answers:

Tyler Quin over at Code has a variety of these plugins available. I'd recommend picking up one of them then looking at the code.

[[LINK href=""]]Tyler's Portfolio on Code Canyon[[/LINK]]

In terms of the theory of how it's done, there are a lot of ways you could do it, but here are some steps to get you started:

1. Get the user's IP using either PHP or jQuery cookies, or other identifying variable
2. Store the IP or other identifying value in an array of accepted IDs
3. Check the user's ID (IP, cookie, or whatever) against those that have been saved
4. Only display content to user's who have been saved in the "accepted list"

If you're only doing it for registered users, then you could use the WordPress user meta table.

Zach Reed comments:

Thanks for the link, that has just what I need. I don't think that link is worth $45, though. I don't mind sending you some money on the side via PayPal for that but lets be honest, you didn't do $45 worth of research to get that answer.

Zach Reed comments:

Please see my refund comments and the comments in "This question had 3 challenges to its refund request." <strong>I'm not trying to scam you or anything</strong> but please see my argument and <strong>please< understand, I'm willing to throw you some money/strong> but I expected, for the $45, code not really just a link to buy the code somewhere else and then work backwards.