The MU forums have moved to WordPress.org

Question about bullets (3 posts)

  1. Crimsontech
    Member
    Posted 17 years ago #

    So, I'm working on my widgets, and I can't figure out how to get my bullets to look the same as the other widgets (Pages, and Meta are the default widgets with correct bullets) - as you can see on my site (http://entertains.us) the bullets are the squares instead of the icons that look like papers as specified by the theme I'm using.

    Now, I want the widget to be compatible with any theme, therefore hard coding the CSS classes would work, but I'm sure it wouldn't work with other themes.

    Therefore, can someone either tell me how to do this, or point me to the detailed themes tutorial somewhere on the WordPress site that I can't seem to find? Thanks!

    -Christine

  2. andrea_r
    Moderator
    Posted 17 years ago #

    This is an inconsistency in coding that bugs the crap outta me. Directly from one of the widgets files (/widgets/widgets.php):

    "// This ONLY works with li/h2 sidebars."

    Also, the Pages and Link tags spew out slightly different sidebar code, as you may already be aware.

    One of the things you can do, rather than add CSS, although it's just as much work, is add specific instructions on those widgets to that theme's functions.

    Here's the offical widgetizing instructions http://automattic.com/code/widgets/themes/
    where they do note that:
    "We prefer to change the markup to our ul/li/h2 standard, but the API is powerful enough that we don’t have to."

    But that doesn't take care of the problem. In our case, we modfied the widget code. In other cases, I have seen people write extensive functions for specific widgets. Like this from the VisterdLittle theme:
    function widget_vistered_links() { ?>
    <ul id="links">
    <?php get_links_list('id'); ?>
    </ul>
    <?php }
    if ( function_exists('register_sidebar_widget') )
    register_sidebar_widget(__('Links'), 'widget_vistered_links');

    So, in the end, the standard widgets will work with any theme that follows the "standard" sidebar markup without you doing anything much. It's only ones "off" from that (and there are many variations) that you run into snags such as this.

  3. Crimsontech
    Member
    Posted 17 years ago #

    OK, thanks for pointing me in the right place. :) It sucks when something piddly like this holds back my whole widget.

About this Topic

  • Started 17 years ago by Crimsontech
  • Latest reply from Crimsontech