• Resolved mikacns

    (@mikacns)


    Hi,

    I’d like to make Call for Action button to open a new window instead of the existing one. I suppose I’ll have to make changes to part of extras.php code below, but not sure what exactly.

    * Call for action text and button displayed above content
     */
    function sparkling_call_for_action() {
      if ( is_front_page() && of_get_option( 'w2f_cfa_text' )!=''){
        echo '<div class="cfa">';
          echo '<div class="container">';
            echo '<div class="col-sm-8">';
              echo '<span class="cfa-text">'. of_get_option( 'w2f_cfa_text' ).'</span>';
              echo '</div>';
              echo '<div class="col-sm-4">';
              echo '<a class="btn btn-lg cfa-button" href="'. of_get_option( 'w2f_cfa_link' ). '">'. of_get_option( 'w2f_cfa_button' ). '</a>';
              echo '</div>';
          echo '</div>';
        echo '</div>';
      }
    }
    endif;
Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author Silkalns

    (@silkalns)

    Replace this line of code:

    echo '<a href="'. of_get_option( 'w2f_cfa_link' ). '">'. of_get_option( 'w2f_cfa_button' ). '</a>';

    with

    echo '<a href="'. of_get_option( 'w2f_cfa_link' ). '" target="_blank">'. of_get_option( 'w2f_cfa_button' ). '</a>';

    and now button will open in a new tab.

    Thread Starter mikacns

    (@mikacns)

    That did it, thank you very much for providing continued support and such a great, free theme! You rock.

    Theme Author Silkalns

    (@silkalns)

    No problem at all. I’m glad I could help ??

    This solution helped me as well. However, the link button remains in the hover mode when you go back to the original page. Is there a way i could have it reset back to normal mode? Thanks for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Call For Action button to open a new window’ is closed to new replies.