WordPress.org

Ready to get started?Download WordPress

Forums

Separating widgets on sidebar (6 posts)

  1. edgallois
    Member
    Posted 4 years ago #

    Hi.

    Does anyone know how to separate widgets on a sidebar so that they appear in separate, cutesy boxes instead of one god-awful, never-ending list? (see my website - bestman.org.uk - for an example of the latter.)

    Both the sidebars on the site are accessing the following CSS:

    #sidebar-top-custom {
    width:147px;
    height: 500px;
    float:left;
    padding:10px 10px 40px 10px;
    background:#ffffff;
    border: 1px solid #dedede;
    }

    Cheers in advance,

    Ed

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Currently it's not possible to apply any real styling to your sidebar content without editing the sidebars and adding some specific classes to the various blocks.

  3. edgallois
    Member
    Posted 4 years ago #

    Can you expand on that? I'm not au fait with divs and classes etc. Cheers, Ed.

  4. alchymyth
    Forum Moderator
    Posted 4 years ago #

    http://www.w3schools.com/html/default.asp

    how to get these extra classes onto your sidebar divs?

    read this:
    http://codex.wordpress.org/Function_Reference/register_sidebars
    and then have a look into functions.php of your theme, and see how it is done there, and if you can edit it to include this class=\"widget %2$s\

    if you get stuck, you could copy the code of sidebar.php(?) and functions.php into a http://wordpress.pastebin.com/ each and post these two links to the pastebins here.

  5. edgallois
    Member
    Posted 4 years ago #

    Thanks. Theme I'm b*stardising is Arthemia Premium, which seems to include a sidebar for every day of the year. The only sidebar I think is actually doing anything at present is #sidebar-top-custom, which is defined in the first few lines of sidebar.php. Have included the pastebin links:

    Sidebar.php = http://wordpress.pastebin.com/m3bf58d67

    Functions.php = http://wordpress.pastebin.com/m7c6096d8

    Cheers,

    Ed

  6. alchymyth
    Forum Moderator
    Posted 4 years ago #

    make a safe backup copy of your theme before attempting to edit any theme files.

    you could try and edit this (line 33 of functions.php):

    register_sidebar(array('name' => 'Sidebar Top','before_widget' => '<div class="%2$s">','after_widget' => '</div>','before_title' => '<h3>','after_title' => '</h3>'));

    and then see if these extra classes are added to the sidebar div ('View' 'Source' in the browser).
    if, you could the try to design new styles based an these classes.

    edit: as you are working with a premium theme, you might get some support from the seller as well.

Topic Closed

This topic has been closed to new replies.

About this Topic