Hi @darkvue,
Thank you for your question.
FYI your site contain content that is not suitable for a general audience or for viewing whilst at work. To avoid creating problems for anyone who is trying to help you, please add NSFW to either the topic title or the content of your post, as well as tag your post NSFW, as a warning if you think your site falls into this category. (Otherwise your post / links may be removed.)
NSFW stands for Not Safe For Work.
Find more information about it on the following WordPress forum welcome page.
http://codex.ww.wp.xz.cn/Forum_Welcome#Warn_About_Adult_Content
I have thumbnails of all my galleries on my home page. You click them and it takes you to the corresponding gallery. I want visitors to be able to see these thumbnails but be denied when they click one of the thumbs (galleries)
I have achieved this on my test site using default WordPress Twenty Twelve theme.
I have added the following code in the functions.php file of my child theme.
add_filter( 'the_content', 'my_the_content_filter', 20 );
function my_the_content_filter( $content ) {
if( !is_user_logged_in() && is_attachment() ){
$content = __('The content is only accessible for logged in users.', 'themetextdomain');
}
return $content;
}
Then copied the image.php file from parent theme in to child theme and made the following changes in it.
Before Editing :
$attachment_size = apply_filters( 'twentytwelve_attachment_size', array( 960, 960 ) );
echo wp_get_attachment_image( $post->ID, $attachment_size );
After Editing :
if( is_user_logged_in() ){
$attachment_size = apply_filters( 'twentytwelve_attachment_size', array( 960, 960 ) );
echo wp_get_attachment_image( $post->ID, $attachment_size );
}
Could you please try achieving it by making the following changes in your child theme?
Information about child theme:
http://premium.wpmudev.org/blog/how-to-create-wordpress-child-theme/
http://codex.ww.wp.xz.cn/Child_Themes
Best Regards,
Vinod Dalvi