Featured image in protected post

Hi
When I display post grid using "Blog" widget in Muffin, image is hidden in post protected by password.
How can I have featured image shown  also if post is password protected?

I found this code to show excerpt also when article is password protected, but I can't adapt it to show featured image:

function wpb_protected_excerpt( $excerpt ) {
if ( post_password_required() ) {
$post = get_post();
$excerpt=$post->post_excerpt;
}
return $excerpt;
}
add_filter( 'the_excerpt', 'wpb_protected_excerpt' );
function wpb_protected_excerpt_posts( $content ) {
if ( post_password_required() && is_single() ) {
$post = get_post();
return $post->post_excerpt.$content;
}}
add_filter( 'the_content', 'wpb_protected_excerpt_posts', 10 );

Can you help please?
(this is the page with protected post list: http://www.dreamtimeviaggi.it/develop/lista-nozze/

Comments

  • Hi,

    What you ask for, is file customization what in reference to Item Support Policy is not allowed. So if you want to modify files and don't know how, you should contact your web developer. Item Policy says:
    Item support does not include services to modify or extend the item beyond the original features, style, and functionality described on the item page. For customization services that will help you tailor the item to your specific requirements, we recommend contacting the author to see if they privately offer paid customisation services or checking out the great service providers on Envato Studio


    thanks
Sign In or Register to comment.