Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1198328

    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 scr.

    See priv. section if you need to see more ..

    BR, Pete

    • This topic was modified 4 years, 8 months ago by 2funky.
    #1201211

    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

    #1201242

    Hi Ismael,

    Thanks, it works fine but the lock disappears.
    Is it possible to change so that the lock does not disappear?

    BR, Pete

    #1203239

    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

    #1203272

    Thanks last solution fits well and i think it is usefull to have.

    #1203313

    Thank Ismael, for taking the time to look at this, it works perfectly.

    you can close this one

    BR, Pete

    #1203390

    Hi,

    If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Mansonry show post img. on password protected post’ is closed to new replies.