Adding another widget to footer…

J Started by Jeff · February 27, 2018 at 10:02 pm · 4 replies 1 voice Last reply 8 years, 4 months ago
J
Jeff Original poster Member
#1

Is there a way to add another widget to the footer?

I’d like to put a call to action row above the 4 columns that spans the full width of the page. This should be on all pages so I’m focused on modifying the footer as it’s already perpetual.

–jeff

ST
Spiracle Themes Original poster
#2

Hi Jeff,

If you are comfortable with editing PHP code then I can provide you the steps to follow. You will have to add a new sidebar using the PHP code and have to modify some PHP files also. Chances are that you might break down your website, otherwise, I suggest you to manually add a call to action to every page using Page Builder.

Best Regards

ST
Spiracle Themes Original poster
#3

Hi Jeff,

There is another alternative to that, You need to create a new page and add your call to action there. Save this page as a TEMPLATE using Elementor Page Builder. Now, whenever you need to add a call to action just insert this TEMPLATE.

Best Regards

J
jeff Original poster
#4

I’m totally comfortable modifying PHP. If you provide the instructions I’ll give it a shot.

I will try the template option in now as a stop gap. That seems like a good process to know either way.

I’ll keep an eye open for the PHP steps.

CHEERS!

–jeff

ST
Spiracle Themes Original poster
#5

Hi Jeff,

Sorry for the delayed response as we were on holiday yesterday.
Please follow the steps carefully

Step 1) Go to the theme root folder ie (wp-content/themes/krystalpro) and open the functions.php file in any text editor

Step 2) Add this line of code after line no 168

register_sidebar( array(
		'name'          => __( 'Above Footer Column', 'krystalpro' ),
		'id'            => 'footer-column5',
		'description'   => __( 'Add widgets here.', 'krystalpro' ),
		'before_widget' => '<div id="%1$s" class="section %2$s">',
		'after_widget'  => '</div>',
		'before_title'  => '<h4 class="widget-title">',
		'after_title'   => '</h4>',
	) );

Screenshot 1
Screenshot 1

Step 3) Now open footer.php and add this code just above line no 15

<div class="above-footer">
        <div class="container">
            <div class="row">
                <?php
                    if(is_active_sidebar('footer-column5')){
                        ?>
                            <div class="col-md-12">
                                <?php
                                    if(is_active_sidebar('footer-column5')){
                                        dynamic_sidebar( 'footer-column5' );
                                    }
                                ?>       
                            </div>
                        <?php
                    }
                ?>
            </div>
        </div>
    </div>

Screenshot 2
Screenshot 2

Step 4) Now go to Appearance -> Widgets and you will now see the Above Footer Column Sidebar. Add your widget here

Let us know if this works for you 🙂

Best Regards

Post a reply

Join the conversation. Be kind — this is a public forum.

Replying to Adding another widget to footer…

By posting, your reply becomes public (unless marked private).