WordPress.org

Ready to get started?Download WordPress

Forums

[Theme: Twenty Ten 1.3] Top right widget aera (4 posts)

  1. bejjj
    Member
    Posted 2 years ago #

    Hello,

    Is it hard to convert the top-right part of the screen (theme : twenty Ten 1.3) :
    <div id="site-description">...</div>
    to a widget area ?

    If it was a widget aera, I could easily put the WPML language switcher widget + some other widgets (social networks icons) there!

    This could be a nice enhancement for Twenty Ten, what do you think ?

  2. bejjj
    Member
    Posted 2 years ago #

    I tried again, but I don't know how to do this...

  3. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    untested:

    1.
    register the sidebar in functions.php;
    example:

    register_sidebar(array(
    'name'         => 'Custom Widget Area',
    'id'            => 'custom-widgets',
    'description'   => 'a custom widget area',
    'before_widget' => '<li id="%1$s">',
    'after_widget'  => '</li>',
    'before_title'  => '<h2>',
    'after_title'   => '</h2>'    ));

    adapt the 'before' and 'after' html to your needs;
    http://codex.wordpress.org/Function_Reference/register_sidebar

    2.
    add a minimal code like this into the #site-description div;
    example:

    <div id="site-description"><?php dynamic_sidebar( 'custom-widgets' ); ?></div>

    http://codex.wordpress.org/Function_Reference/dynamic_sidebar

    3.
    possibly adjust the formatting by adding any relevant new styles to style.css

  4. bejjj
    Member
    Posted 2 years ago #

    Thanks, it works!
    Now the language selector is on top right! :)
    http://jeuxdorgues.com/newsite/

    But the display is not good.... I'm getting crazy with css, and it doesn't work... any idea ?

Topic Closed

This topic has been closed to new replies.

About this Topic