ability to add wigets / menus to top of page

  1. devilwah


    I have the twenty Ten theme, and one thing I cant do that I think would be nice to be able add drop down lists to the top of the page.

    for example rather than have recent posts to the right of the feed,drag it to the top of the page, so people click on the top menu and get show the list. I also have a list of helpful webpages, at the moment there are hidden as they are half way down the page, it would be nice to add them to the top next to the "home" tab.

    So rather than just have side menu and footer area for widgets, also have the ability to add them to a header area, that included the home tab and any pages you have created.

    This allows you to display a lot more of the dynamic info to a visitor to you page, with out them having to scroll.

    Cheers and a great theme :)


    Posted: 7 years ago #
  2. eighty4proof

    You can add widgets anywhere in the theme, header.php too. There are two steps: you have to create a sidebar within your template and you have to register it within functions.php (starts on line 351 for twentyten). For how to create/register a sidebar, see the tutorial here: http://www.themelab.com/2008/04/18/see-how-easy-it-is-to-widgetize-wordpress-themes/

    Posted: 7 years ago #
  3. devilwah

    Am i correct in thinking I would add some thing like this to the function.php?

    if ( function_exists('register_sidebar') )
    'name' => 'header',
    'before_widget' => '',
    'after_widget' => '',
    'before_title' => '<h2>',
    'after_title' => '</h2>',

    and then

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("header") ) : ?>Default right headerstuff hereā€¦
    <?php endif; ?>

    to the header.php script?

    Sorry I am a complete PHP/HTML/WEB novice, and I don't want to destroy what I have set up already :)


    Posted: 7 years ago #

RSS feed for this topic


You must log in to post.

  • Rating

    4 Votes
  • Status

    This is theme territory