WordPress.org

Ready to get started?Download WordPress

Forums

Expound
[resolved] Add New Widget Area Under Menu (3 posts)

  1. JoeMD
    Member
    Posted 8 months ago #

    Hello,

    I'm wondering if it's at all possible to add a new widget area under the theme's menu and if so, how would I go about doing it?

    Cheers.

  2. JoeMD
    Member
    Posted 8 months ago #

    Ok, I've been able to create the widget area by adding the following code.

    if (function_exists('register_sidebar')) {
    	register_sidebar(array(
    		'name'=> 'Top Wiki',
    		'id' => 'top_wiki',
    		'before_widget' => '<li id="%1$s" class="widget %2$s">',
    		'after_widget' => '</li>',
    		'before_title' => '<h3>',
    		'after_title' => '</h3>',
    ));

    But I can't figure out how to get it to display.

    http://www.soniccollectors.com/

  3. JoeMD
    Member
    Posted 8 months ago #

    Got it to work by adding the following to the header.php

    <?php
     // Custom widget Area Start
     if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Top_Wiki') ) : ?>
    <?php endif;
    // Custom widget Area End
    ?>

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.