• Home
  • Blog
  • Showcase
  • Setup Docs
    • Sunshine Help
    • Flex Help
  • Support
    • Support Area
    • Contact us
    • Feedback
  • Connect
    • Newsletter
    • Twitter
    • Facebook
  • My Account
  • Flex
  • Sunshine
Support : Simple Pro Themes

Support : Simple Pro Themes

[Resolved] Banner Button Link Open in New Tab

If you have purchased a product, please enter the email address that you used to register at time of purchase.
Log In
Lost Password

Create an Account
  • Your username must be unique, and cannot be changed later.
  • We use your email address to email you a secure password and verify your account.

Support › Forums › Flex Theme › Banner Button Link Open in New Tab

  • This topic has 2 replies, 2 voices, and was last updated 3 years, 10 months ago by Chinmoy Paul.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 24, 2017 at 8:22 pm #1600
    genunlimited
    Participant

    On the home page, the banner section with the image and 2 buttons, I can’t find where I can make these links open up in a new tab. I’ve looked all over in the php files as well. I need to have these links open in a new tab.

    Thanks!

    – Mike

    March 24, 2017 at 8:32 pm #1601
    genunlimited
    Participant

    I found the home-banner.php file, but not sure where to add the target=”_blank” in the code line. I imagine its’ somewhere in line 169-170 since I want to change the first button. Can anyone here direct me to where I should add it?

    March 25, 2017 at 5:55 am #1605
    Chinmoy Paul
    Moderator

    Open the home-banner.php file from lib/widgets

    Replace

     if( $instance['button_1'] && $instance['button_1_url'] ) {
              printf( '<a class="button btn-1 solid" href="%1$s">%2$s</a>', $instance['button_1_url'], $instance['button_1'] );
            }
            
            if( $instance['button_2'] && $instance['button_2_url'] ) {
              printf( '<a class="button btn-2 blank" href="%1$s">%2$s</a>', $instance['button_2_url'], $instance['button_2'] );
            }
    

    WITH

     if( $instance['button_1'] && $instance['button_1_url'] ) {
              printf( '<a class="button btn-1 solid" href="%1$s" target="_blank">%2$s</a>', $instance['button_1_url'], $instance['button_1'] );
            }
            
            if( $instance['button_2'] && $instance['button_2_url'] ) {
              printf( '<a class="button btn-2 blank" href="%1$s" target="_blank">%2$s</a>', $instance['button_2_url'], $instance['button_2'] );
            }
    
  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Copyright © 2021 · Simple PRO Themes for Genesis Framework · About · FAQs · Contact · Affiliates