New Landing How can we help? Atelier Adding additional p class to promo bar

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Atelier
  • #200799
    gorenovo
    Member
    Post count: 7

    Hello,

    I want to add a extra paragraph element to the promo bar. I was looking throughout the theme files via a FTP client and couldn’t find any .php file that would allow me to add the HTML.

    Any suggestions?

    Simon

    #200878
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Add this to your child theme’s functions.php file:

    /* FOOTER PROMO
        ================================================== */
        if ( ! function_exists( 'sf_footer_promo' ) ) {
            function sf_footer_promo() {
                global $sf_options;
    
    			$footer_promo_bar_text_size = "";
    			$footer_promo_bar_button_type = "drop-shadow";
    
                $enable_footer_promo_bar        = $sf_options['enable_footer_promo_bar'];
                $footer_promo_bar_type          = $sf_options['footer_promo_bar_type'];
                $footer_promo_bar_text          = __( $sf_options['footer_promo_bar_text'], "swiftframework" );
                $footer_promo_bar_button_color  = $sf_options['footer_promo_bar_button_color'];
                $footer_promo_bar_button_text   = __( $sf_options['footer_promo_bar_button_text'], "swiftframework" );
                $footer_promo_bar_button_link   = __( $sf_options['footer_promo_bar_button_link'], "swiftframework" );
                $footer_promo_bar_button_target = $sf_options['footer_promo_bar_button_target'];
    
    			if ( isset($sf_options['footer_promo_bar_text_size']) ) {
    				$footer_promo_bar_text_size	    = $sf_options['footer_promo_bar_text_size'];
    			}
    			if ( isset($sf_options['footer_promo_bar_button_type']) ) {
    				$footer_promo_bar_button_type	    = $sf_options['footer_promo_bar_button_type'];
    			}
    
                if ( $enable_footer_promo_bar ) {
                    ?>
                    <!--// OPEN #base-promo //-->
                    <div id="base-promo" class="sf-promo-bar promo-<?php echo $footer_promo_bar_type; ?>">
                        <?php if ( $footer_promo_bar_type == "button" ) { ?>
                            <p class="<?php echo $footer_promo_bar_text_size; ?>"><?php echo esc_attr($footer_promo_bar_text); ?></p>
                            <a href="<?php echo esc_url($footer_promo_bar_button_link); ?>"
                               target="<?php echo $footer_promo_bar_button_target; ?>"
                               class="sf-button <?php echo $footer_promo_bar_button_type; ?> <?php echo $footer_promo_bar_button_color; ?>"><?php echo esc_attr($footer_promo_bar_button_text); ?></a>
                        <?php } else if ( $footer_promo_bar_type == "arrow" ) { ?>
                            <a href="<?php echo esc_url($footer_promo_bar_button_link); ?>"
                               target="<?php echo $footer_promo_bar_button_target; ?>"><?php echo esc_attr($footer_promo_bar_text); ?>
                                <?php echo apply_filters( 'sf_next_icon', '<i class="ss-navigateright"></i>' ); ?></a>
                        <?php } else { ?>
                            <a href="<?php echo esc_url($footer_promo_bar_button_link); ?>"
                               target="<?php echo $footer_promo_bar_button_target; ?>" class="<?php echo $footer_promo_bar_text_size; ?>"><?php echo esc_attr($footer_promo_bar_text); ?></a>
                        <?php } ?>
                        <!--// CLOSE #base-promo //-->
                    </div>
                <?php
                }
    
            }
    
            add_action( 'sf_main_container_end', 'sf_footer_promo', 20 );
        }

    And edit the code as you wish

    – Kyle

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register