Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

Media link to open in new tab

    • 7 years, 4 months ago julan
      Participant

      Expired

      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

    • 7 years, 4 months ago Mirela
      Participant

      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!

    • 7 years, 3 months ago julan
      Participant

      Expired

      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

    • 7 years, 3 months ago Mirela
      Participant

      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!

Viewing 3 reply threads

You must be logged in to reply to this topic.

Login

Log In
Register

Renew Support

  • Renew Specular Support
  • Renew Tower Support
  • Renew Folie Support
  • Renew Handel Support
  • Renew June Support
  • Renew Picante Support
  • Renew Thype Support
  • Renew Regn Support

Search Forums

Forums

  • Bygge – Construction Theme
  • Converta – Software Theme
  • Folie – The WordPress Website Builder
  • Handel – Responsive Multi-Purpose Business Theme
  • June WooCommerce WordPress Theme
  • Livecast – Podcast Theme
  • Picante – Restaurant & Food WordPress Theme
  • Regn | Agency & Business WordPress Theme
  • Remake – Minimal Portfolio & Agency Theme
  • Specular – Multi-Purpose WordPress Theme
  • Suggest us Features
  • Tower – Business-Driven Multipurpose WP Theme
  • Vibrance – Photography Theme

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password