How can I add a fourth widget to the homepage for WordPress Unite theme?

I am trying to add another widget to the homepage, but am unable where I can add these. I only see the option to add 3 widgets to the homepage. Is there a way to modify one of the functions to add a fourth widget?

Nevermind. I’ve figured it out. It’s in the theme’s functions.php file.

There is no option for that available via WordPress dashboard and you will have to do code modification to achieve this. It is fairly easy modification.

  1. First of all you should register a new sidebar by adding code like this to functions.php file:
    register_sidebar(array(
		'id'            => 'home4',
		'name'          => 'Homepage Widget 4',
		'description'   => 'Used only on the homepage page template.',
		'before_widget' => '<div id="%1$s" class="widget %2$s">',
		'after_widget'  => '</div>',
		'before_title'  => '<h3 class="widgettitle">',
		'after_title'   => '</h3>',
    ));

Add it after similar looking code that has home3 in it. If you are using text editor with line numbering then you should fine line number 131 and add your code there.

  1. Now you should see another widget are under Appearance >> Widgets but widget won’t show up on frontpage. For that you will have to edit front-page.php file.
    On that file find <div class=“home-widget-area row”>

And below that code replace existing code with code like this:

<div class="col-sm-6 col-md-3 home-widget">
	<?php if( is_active_sidebar('home1') ) dynamic_sidebar( 'home1' ); ?>
</div>

<div class="col-sm-6 col-md-3 home-widget">
	<?php if( is_active_sidebar('home2') ) dynamic_sidebar( 'home2' ); ?>
</div>

<div class="col-sm-6 col-md-3 home-widget">
	<?php if( is_active_sidebar('home3') ) dynamic_sidebar( 'home3' ); ?>
</div>

<div class="col-sm-6 col-md-3 home-widget">
	<?php if( is_active_sidebar('home4') ) dynamic_sidebar( 'home4' ); ?>
</div>

I think that it should be easy to read what the different on this code versus one that you have now.

Let me know if this helps.

Eh, I was already working on this.

Glad you already figured everything on your own.