Post passwords and custom functions
-
Hi,
I have a page template which displays content on the left and thumbnails on the right. Thumbnails are generated using a custom php function and data extracted from the custom fields.
When I password protect the post the content is correctly hidden using the_content – please enter password, but I need some code for the thumbnails.
Something like:
IF password_protected AND password_entered_correct
{
show thumbnails
}
else
{
please enter password
}Anybody know how to do this? Is there a global for the password which I can compare to post_password?
I am currently using
if (empty($post->post_password)) {
to hide content, but using this it never gets shown.
Thanks in advance
Tim
- The topic ‘Post passwords and custom functions’ is closed to new replies.