Hi @gulin,
Greetings and thanks for posting on the forum.
I have tested it on my test site using latest version of WordPress PopUp plugin but didn’t get any duplicate image in the pop up.
Please check whether you have added the image in the pop up content mistakenly or is this theme conflict on your site?
To check for theme conflict try temporary using default WordPress theme like Twenty Thirteen.
Also try using different pop up loading methods from the PopUp Settings.
Kind Regards,
WPMU DEV
Thread Starter
gulin
(@gulin)
I tried the following templates – Twenty Eleven, Yo! Manga
and all templates attachment duplicated in a popup window
Hi @gulin,
Thank you for your quick reply.
I could reproduce this issue on my test site on attachment pages.
I could fix this issue using two solutions as following which you can also use to fix it.
Change the pop up loading method to “WordPress AJAX” in the PopUp Settings.
Alternatively try adding the following code in the functions.php file of your child theme.
function remove_images( $content ) {
global $post;
$post_type = get_post_type( $post );
if( $post_type == 'attachment' ){
$content = preg_replace('/<img[^>]+./','', $content);
}
return $content;
}
add_filter( 'the_content', 'remove_images', 100 );
Best Regards,
WPMU DEV
Thread Starter
gulin
(@gulin)
Thank you, my friend!
method to “WordPress AJAX” runs like clockwork
You are most welcome, if i can be of any further assistance please don’t hesitate to ask π