Viewing 3 reply threads
You must be logged in to reply to this topic.
When I add a custom link for my media(image), I don’t see an option to open in a new window. I’m adding a screenshot..https://cl.ly/3A3k2I3C0H0i
Thanks
Hello,
There is no option for that. You have to change theme code in order to make single images open in new tab. Please keep in mind that by changing this, all media images will do the same. And you will need to redo the change sin case of a theme update. So we recommend keeping a backup of the edited file.
Go to file includes\codeless_builder\shortcodes\cl_media.php and find these lines:
<?php if( $custom_link != '#' && ! empty( $custom_link ) ): ?>
<a href="<?php echo esc_url( $custom_link ) ?>" class="custom-link"></a>
<?php endif; ?>
Replace with these:
<?php if( $custom_link != '#' && ! empty( $custom_link ) ): ?>
<a href="<?php echo esc_url( $custom_link ) ?>" class="custom-link" target="_blank"></a>
<?php endif; ?>
Save changes.
Best regards!
Thanks for the info. Is there any other way to use an image and have its link open in new tab without making it a global theme change? Better yet, maybe this should be a feature add?… Anyway, looking forward to your response.
Thanks,
Joe
Hello,
Sorry but this is the only way. This edit can not be achieved using custom css.
This is a personal preference and other customers do not want it. So we can not add it to theme default settigns.
You have to make the customization.
Best regards!
You must be logged in to reply to this topic.