Forums

[resolved] where can i change the styles for cat-item...it's not in the stylesheet??? (7 posts)

  1. janice171
    Member
    Posted 2 years ago #

    Hi,

    i want to make changes to the sidebar listings, but i just cannot find where abouts this is being generated from.
    I'm using widgets by the way and the html generated is as follows:

    <li id="categories-3" class="widget widget_categories"><h2 class="sidebartitle">Categories</h2><ul>
    <li class="cat-item cat-item-3 current-cat">
    <a href="http://www.mySite.com/blog/?cat=3" title="View all posts filed under Cat1">Cat1</a> (3)
    <ul class='children'>
    <li class="cat-item cat-item-4">
    <a href="http://www.mySite.com/blog/?cat=4" title="View all posts filed under Cat1-sub">Cat1-sub</a> (2)
    </li>
    </ul>
    </li>

    ...or do i have to write in the styles?

  2. Mark / t31os
    Moderator
    Posted 2 years ago #

    Write them into the stylesheet...

  3. janice171
    Member
    Posted 2 years ago #

    thanks for the response...
    so presumably i would style the li tags with a class of .cat-item and also .current-cat?

  4. janice171
    Member
    Posted 2 years ago #

    also...the entire block of html after the <div id="sidebar"> is contained in UL tags and i want to take everything out of this so the ul tag can start below the category <h2> tag...any idea how i do that?

  5. Mark / t31os
    Moderator
    Posted 2 years ago #

    sidebar.php in your theme? As a guess...

  6. janice171
    Member
    Posted 2 years ago #

    yeah i've altered that....i've actually integrated it with my page.php to make things easier.
    I'm presuming the bit of code generating all the widget stuff is this bit:
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>

    ...but i don't know where to find the bits of code that make up the 'dynamic_sidebar'....if this is the correct snippet anyway?
    Any ideas more than appreciated

  7. Mark / t31os
    Moderator
    Posted 2 years ago #

    Yes that's right, check your functions.php (theme file) for widget related code...

Topic Closed

This topic has been closed to new replies.

About this Topic