Homepage widget above Call for Action

Is it possible to insert a widget above the Call for Action on the homepage? I want to put a slider in there, but don’t necessarily want to use the slider that comes with the theme.

Hi @swanton24,

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

You can either display your custom slider above the Call for action section by adding the following code in the functions.php file of your child theme and add your custom slider code in place of the text “Add your custom code / content here.” in the following code.

function sparkling_call_for_action() {
	if( is_front_page()){
		echo "Add your custom code / content here.";
	  if ( 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>';
	  }
	}
}

Or you can just replace the existing slider with your custom slider by adding the following code in the functions.php file of your child theme and add your custom slider code in place of the text “Replace the slider here.” in the following code.

function sparkling_featured_slider() {

	echo "Replace the slider here.";
}

I have attached the sample child theme of Sparkling theme that contains both the above code so you can just use that theme.

Please advise if you have more questions.

Best Regards,
Movin