Promo boxes - can I make them links?

In the most basic way possible how I can I make the icons and text in the promo boxes link to the relevant information? Also, can I change the footer wording easily?

Hello there,

I’m sorry, there are no link option for the promo box. In fact, it’s only display a little information.

And for the footer, you can try to install footer putter plugin to manage your footer site.

Regards,
Awan

You can do this by adding some extra code to “wp-content > themes > theshop > inc > header-functions.php” and “wp-content > themes > theshop > inc > customizer.php”

In header-functions.php find:


if ( ! function_exists( 'theshop_top_promo' ) ) :
function theshop_top_promo() {
	$block_texts 	= array();
	$block_texts[]	= get_theme_mod('block_text_1', 'Free shipping');
	$block_texts[] 	= get_theme_mod('block_text_2', 'Friendly prices');
	$block_texts[] 	= get_theme_mod('block_text_3', 'Always on time');
	$block_icons 	= array();
	$block_icons[]	= get_theme_mod('block_icon_1', 'fa-rocket');
	$block_icons[] 	= get_theme_mod('block_icon_2', 'fa-money');
	$block_icons[] 	= get_theme_mod('block_icon_3', 'fa-clock-o');

	foreach ($block_texts as $index => $block_text) {
		if ($block_text) {
			echo '<div class="promo-box">';
			echo '<i class="fa ' . esc_html($block_icons[$index]) . '"></i>';
			echo '<span>' . esc_html($block_text) . '</span>';
			echo '</div>';

Replace it with:


if ( ! function_exists( 'theshop_top_promo' ) ) :
function theshop_top_promo() {
	$block_texts 	= array();
	$block_texts[]	= get_theme_mod('block_text_1', 'Free shipping');
	$block_texts[] 	= get_theme_mod('block_text_2', 'Friendly prices');
	$block_texts[] 	= get_theme_mod('block_text_3', 'Always on time');
	$block_icons 	= array();
	$block_icons[]	= get_theme_mod('block_icon_1', 'fa-rocket');
	$block_icons[] 	= get_theme_mod('block_icon_2', 'fa-money');
	$block_icons[] 	= get_theme_mod('block_icon_3', 'fa-clock-o');
	$block_url  	= array();
	$block_url[]	= get_theme_mod('block_url_1', 'http://');
	$block_url[] 	= get_theme_mod('block_url_2', 'http://');
	$block_url[] 	= get_theme_mod('block_url_3', 'http://');

	foreach ($block_texts as $index => $block_text) {
		if ($block_text) {
			echo '<div class="promo-box">';
			echo '<a href="' . esc_html($block_url[$index]) . '"> ';
			echo '<i class="fa ' . esc_html($block_icons[$index]) . '"></i>';
			echo '<span>' . esc_html($block_text) . '</span>';
			echo '</a>';
			echo '</div>';

Then in customizer.php find:


   //Box 1
    $wp_customize->add_setting(
        'block_icon_1',
        array(
            'default' => 'fa-rocket',
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_icon_1',
        array(
            'label' => __( 'Box 1 icon', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );    
    $wp_customize->add_setting(
        'block_text_1',
        array(
            'default' => __( 'Free shipping', 'theshop' ),
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_text_1',
        array(
            'label' => __( 'Box 1 text', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );
    //Box 2
    $wp_customize->add_setting(
        'block_icon_2',
        array(
            'default' => 'fa-money',
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_icon_2',
        array(
            'label' => __( 'Box 2 icon', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );    
    $wp_customize->add_setting(
        'block_text_2',
        array(
            'default' => __( 'Friendly prices', 'theshop' ),
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_text_2',
        array(
            'label' => __( 'Box 2 text', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );
    //Box 3
    $wp_customize->add_setting(
        'block_icon_3',
        array(
            'default' => 'fa-clock-o',
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_icon_3',
        array(
            'label' => __( 'Box 3 icon', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );    
    $wp_customize->add_setting(
        'block_text_3',
        array(
            'default' => __( 'Always on time', 'theshop' ),
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_text_3',
        array(
            'label' => __( 'Box 3 text', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );

And replace it with:


    //Box 1
    $wp_customize->add_setting(
        'block_icon_1',
        array(
            'default' => 'fa-rocket',
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_icon_1',
        array(
            'label' => __( 'Box 1 icon', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );    
    $wp_customize->add_setting(
        'block_text_1',
        array(
            'default' => __( 'Free shipping', 'theshop' ),
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_text_1',
        array(
            'label' => __( 'Box 1 text', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );
    $wp_customize->add_setting(
        'block_url_1',
        array(
            'default' => __( 'http://', 'theshop' ),
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_url_1',
        array(
            'label' => __( 'Box 1 url', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );
    //Box 2
    $wp_customize->add_setting(
        'block_icon_2',
        array(
            'default' => 'fa-money',
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_icon_2',
        array(
            'label' => __( 'Box 2 icon', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );    
    $wp_customize->add_setting(
        'block_text_2',
        array(
            'default' => __( 'Friendly prices', 'theshop' ),
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_text_2',
        array(
            'label' => __( 'Box 2 text', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );
    $wp_customize->add_setting(
        'block_url_2',
        array(
            'default' => __( 'http://', 'theshop' ),
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_url_2',
        array(
            'label' => __( 'Box 2 url', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );
    //Box 3
    $wp_customize->add_setting(
        'block_icon_3',
        array(
            'default' => 'fa-clock-o',
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_icon_3',
        array(
            'label' => __( 'Box 3 icon', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );    
    $wp_customize->add_setting(
        'block_text_3',
        array(
            'default' => __( 'Always on time', 'theshop' ),
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_text_3',
        array(
            'label' => __( 'Box 3 text', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );
    $wp_customize->add_setting(
        'block_url_3',
        array(
            'default' => __( 'http://', 'theshop' ),
            'sanitize_callback' => 'theshop_sanitize_text',
        )
    );
    $wp_customize->add_control(
        'block_url_3',
        array(
            'label' => __( 'Box 3 url', 'theshop' ),
            'section' => 'theshop_header_boxes',
            'type' => 'text',
            'priority' => 10
        )
    );