Is there any way to password-protect the full entry content, but display the teaser/excerpt freely?
I tried looking it up but couldn't find anything.
Thanks in advance
Is there any way to password-protect the full entry content, but display the teaser/excerpt freely?
I tried looking it up but couldn't find anything.
Thanks in advance
Seconding this request.
Would take a bit of coding to accomplish. But yep, can be done. Here's one way:
Replace
<?php the_content(); ?>
in your template with
<?php
if(!empty($post->post_password)) :
if(stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password) :
$teaser = explode('<!--more-->', $post->post_content, 2);
echo apply_filters('the_content', $teaser[0]);
echo get_the_password_form();
else :
echo apply_filters('the_content', $post->post_content);
endif;
else :
the_content();
endif;
?>
Yeah, a little complicated...
This topic has been closed to new replies.