The MU forums have moved to WordPress.org

Strange sidebar issue (7 posts)

  1. BinaryMoon
    Member
    Posted 15 years ago #

    I've tried searching so apologies if this is already mentioned elsewhere.

    I have a normal wordpress theme that I want to use on a wordpress mu install and most of it works fine. There's one problem though - the widgets are changing their formatting.

    In functions.php the widgets have been set to use this format for their layout


    'before_widget' => '<div id="%1$s" class="widget %2$s column span-4">',
    'before_title' => '<div class="clear"><h3 class="widgettitle">',
    'after_title' => '</h3></div>',
    'after_widget' => '</div>',

    but these properties get ignored and everything gets surrounded by list items - which is messing up the styles :(

    Is this a known problem or have I done something wrong or what?

    Any help would be greatly appreciated

    Thanks

  2. andrea_r
    Moderator
    Posted 15 years ago #

    Usually you can specify alternate formatting for widgets and it works fine in mu, just liek in regualr WP.

    What's this bit for?

    <div id="%1$s" class="widget %2$s column span-4">

    specifically the %1 & %2... I'm guessing maybe they aren't getting parsed so it's defaulting.

  3. BinaryMoon
    Member
    Posted 15 years ago #

    The bits you picked out (%1 & %2) are used by wordpress to substitute in the id and class within the template. I took these from the Automattic widgets docs - http://automattic.com/code/widgets/api/

    The default, specified in wp-includes/widgets.php is

    'before_widget' => '<li id="%1$s" class="widget %2$s">',

    so I don't think that's the problem.

    I wonder if it's something else to do with the embed method.

  4. andrea_r
    Moderator
    Posted 15 years ago #

    Huh. Never noticed that bit anywhere before.

    What theme is it?

  5. BinaryMoon
    Member
    Posted 15 years ago #

    ok - I'm very stupid

    I hadn't added any widgets to the theme and it was using the default sidebar layout which was formatted differently to the widget definition.

    Apologies for wasting your time - I shall crawl back into my hole now

  6. andrea_r
    Moderator
    Posted 15 years ago #

    Whups. :D

    Eh, it's okay. I've used & abused your custom login plugin for ages now, so we can be "even" if you like.

    ;D

  7. BinaryMoon
    Member
    Posted 15 years ago #

    ha haa - sounds good :)

About this Topic

  • Started 15 years ago by BinaryMoon
  • Latest reply from BinaryMoon