New Topic

Reply To: Customization (My Website)

Home › Forum › Customization › Customization (My Website) › Reply To: Customization (My Website)

#874

StartupWP
Keymaster

1. That’s correct and apologies, even we learned something new about child theming :). So here’s what all you’ll want in your child theme functions.php so far:

<?php
add_action( 'widgets_init', 'startup_widgets_init_child' );
function startup_widgets_init_child() {
register_sidebar( array (
'name' => __('Footer Widget Area 2', 'startup' ),
'id' => 'footer-widget-area-2',
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => "</li>",
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
}

And that’s all, we’ve now registered a new widget area.

Next, wherever you want that widget area to appear, you’ll copy over that file (in this case you do want to duplicate the whole file from the parent theme) and then add:

<div id="footer-sidebar">
<?php if ( is_active_sidebar('footer-widget-area-2') ) : ?>
<div id="fsidebar" class="widget-area">
<ul class="sid">
<?php dynamic_sidebar('footer-widget-area-2'); ?>
</ul>
<div class="clear"></div>
</div>
<?php endif; ?>
</div>

And finally, you of course assign widgets to the widget area under Appearance > Widgets.

2. Aah yes, http://prntscr.com/1az7r8 – See top-left, you’ve assigned the footer menu on the dropdown, but haven’t yet assigned the main menu in the dropdown option, then make sure to save.