-
AuthorPosts
-
March 27, 2020 at 1:30 pm #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 lockSee priv. section if you need to see more ..
BR, Pete
-
This topic was modified 5 years, 7 months ago by
2funky.
April 6, 2020 at 1:03 pm #1201211Hey 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,
IsmaelApril 6, 2020 at 3:07 pm #1201242Hi Ismael,
Thanks, it works fine but the lock disappears.
Is it possible to change so that the lock does not disappear?BR, Pete
April 13, 2020 at 7:40 am #1203239Hi,
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,
IsmaelApril 13, 2020 at 12:54 pm #1203272Thanks last solution fits well and i think it is usefull to have.
April 13, 2020 at 4:57 pm #1203313Thank Ismael, for taking the time to look at this, it works perfectly.
you can close this one
BR, Pete
April 13, 2020 at 11:50 pm #1203390Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
This topic was modified 5 years, 7 months ago by
-
AuthorPosts
- The topic ‘Mansonry show post img. on password protected post’ is closed to new replies.
