Second Call For Action Button

Hello!

Can I add a second call for action button, next to the existing one?

Thanks in advance!

Hi @vargaszabi,

I hope you are well today and thank you for your question.

You can try achieving this by using the attached custom child theme of Sparkling theme that contains following custom code in its functions.php file which you can modify however you want.


/**
 * 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-4">';
          echo '<span class="cfa-text">'. of_get_option( 'w2f_cfa_text' ).'</span>';
          echo '</div>';
          echo '<div class="col-sm-8">';
          echo '<a class="btn btn-lg cfa-button" href="'. of_get_option( 'w2f_cfa_link' ). '">'. of_get_option( 'w2f_cfa_button' ). '</a>';
          echo '<a class="btn btn-lg cfa-button" href="#">Add Button Text Here</a>';
          echo '</div>';
      echo '</div>';
    echo '</div>';
  }
}

Best Regards,
Movin

Something broke :slight_smile:
Site is offline fatal error on line 447 when I copied the code into the functions page

Can’t even get to the back end now

@netdaddy I have already replied on your following existing topic so please do not post on this topic to avoid duplication of replies.

https://colorlibsupport.com/t/call-for-action-button-2/#post-55337

Right last thing and i think i have it sorted how to i edit that 2nd call for action with the customiser or do i do it in the code ? if so where do i edit is it the functions page.

Also at the bottom of the page i have the advertisers how can i stretch that along the whole footer, instead of just being in the left hand column.

@netdaddy

To help us keep support thread separates could you please create your own thread for your question here https://colorlibsupport.com/c/sparkling/ instead of replying on others thread as it makes the thread messy and hard to read.

If you want to you can also add reference of this thread in your newly created thread.

We would be more than happy to help you on your new thread.

How do I edit the 2nd button txt and link and the size of the button what file do I edit or do I edit it on the customize option ???

@netdaddy You have been told many time previously to post in your own topic and not to bump or spam here.