Support » Themes and Templates » [Theme: Twenty Ten 1.3] Top right widget aera

  • bejjj

    (@bejjj)


    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 ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • bejjj

    (@bejjj)

    I tried again, but I don’t know how to do this…

    Michael

    (@alchymyth)

    Forum Moderator

    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

    bejjj

    (@bejjj)

    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 ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Theme: Twenty Ten 1.3] Top right widget aera’ is closed to new replies.