• Resolved mariannejosiasse

    (@mariannejosiasse)


    Hello,
    I took a tutorial to add a widget area of my own to a template. In a basic theme it worked right away. But in the Aplite Theme I immediately get a blank page when I try to add the code, and also, I don’t recognize the code and the place where to put it.

    In functions.php I add the following code:
    register_sidebar( array (
    ‘name’ =>’Eigen Widget Gebied’,
    ‘id’ =>’eigen_widget_gebied’,
    ‘before_widget’ =>'<aside>’,
    ‘after_widget’ =>'</aside>’,
    ‘before_title’ =>'<h3 class=”widget_title”>’,
    ‘after_title’ =>'</h3>’,
    ));
    }

    add_action (‘widget_init’, aplite_widgets_init’)

    In header.php:
    <? php if (dynamic_sidebar (‘eigen_widget_gebied’) ) :else :endif; ?>

    What is going wrong here? How does this work?

    Greetz,

    Marianne

Viewing 2 replies - 1 through 2 (of 2 total)
  • Shane

    (@richardkanes)

    Hello there,
    Thanks for writing in.

    To add new widget area, in extra.php you can copy the code of the function and add new function with the new name, id and description. The code is given below:

    register_sidebar( array(
    ‘name’ =>’Eigen Widget Gebied’,
    ‘id’ =>’eigen_widget_gebied’,
    ‘before_widget’ => ‘<aside id=”%1$s” class=”widget %2$s”>’,
    ‘after_widget’ => ‘</aside>’,
    ‘before_title’ => ‘<h3 class=”widget-title”>’,
    ‘after_title’ => ‘</h3>’,
    ) );

    Thanks.

    Theme Author Access Keys

    (@access-keys)

    We hope your issue is solved here.
    Thank you for contacting us.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add new widget area’ is closed to new replies.