Hi,
How do i show the post’s standard image on a post if it is password protected?
The image is be displayed if you click on the post.
The overview is created via Masonry
My customer would like to see it as the background behind the lock
See priv. section if you need to see more ..
BR, Pete
Hey Peter,
Thank you for the inquiry. And sorry for the delay.
This is possible, but you have to modify the enfold\config-templatebuilder\avia-shortcodes\av-helper-masonry.php file and remove this code starting from line 752:
//check if post is password protected
if( post_password_required( $id ) )
{
$this->loop[ $key ]['content'] = '';
$this->loop[ $key ]['class'][] = 'entry-protected';
$this->loop[ $key ]['thumb_ID'] = '';
$this->loop[ $key ]['text_before'] = av_icon_display('closed');
$this->loop[ $key ]['text_after'] = $this->loop[ $key ]['date'];
}
Or replace it with:
//check if post is password protected
if( post_password_required( $id ) )
{
$this->loop[ $key ]['class'][] = 'entry-protected';
}
Best regards,
Ismael
Hi Ismael,
Thanks, it works fine but the lock disappears.
Is it possible to change so that the lock does not disappear?
BR, Pete
Hi,
Sorry for the delay. Try to replace the code with this one.
//check if post is password protected
if( post_password_required( $id ) )
{
$this->loop[ $key ]['class'][] = 'entry-protected';
$this->loop[ $key ]['text_before'] = av_icon_display('closed');
}
Best regards,
Ismael
Thanks last solution fits well and i think it is usefull to have.
Thank Ismael, for taking the time to look at this, it works perfectly.
you can close this one
BR, Pete
Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon