Wordpress authentication and login manager
Is there a way to create a sort of authentication for wordpress which would block unauthorized users from some particular pages and posts but would allow any user to view some pages. I would also like the users of the blog to be able to 开发者_开发问答register and login through facebook-connect, or google accounts. Is this possible.
for the authentication purpose you can use the_content
filter and check for the conditions in there...
if you dont want unregistered users to view the post you can check the condition using is_single() and is_user_logged_in()
there are other conditional tags like is_page(), is_home()
, etc use the following code to check for if a particular template is active http://www.wprecipes.com/how-to-check-if-a-page-template-is-active
you can even selectively allow some users to access a post or page by comparing their user_id's if the are logged in
精彩评论