Support » Themes and Templates » Applying a class to the blogroll <ul>

  • Resolved mickieluv


    Hello all,

    I’m very new to wordpress, and although I am making good progress with my theme I’m struggling to find a way to add a class to the
    ul that surrounds the blogroll list.

    My theme is based on Kubrick, so the blogroll code (in sidebar.php) looks like this

    <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    <?php get_links_list(); ?>

    Obviously this doesn’t allow me access to the

    ul tag itself as the meta or categories lists do, so how do I achieve this?

    I’ve search for the get_links_list function and found what I think is the right piece of code in wp-includes/links.php starting at line 548

    // Display the category name
    echo ' <li id="linkcat-' . $cat['link_category'] . '"><h2>' . $cat['cat_name'] . "</h2>nt
    // Call get_links() with all the appropriate params

    // Close the last category
    echo "nt</ul>

    But when i add class=”something” to the ul in the following code


    my blog doesn’t work anymore: can anyone tell me the correct way to do this? I’ve searched the forum but cannot find anything directly relevant.

    Any help here would be most appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Use class='something' — with single quotes. Or you can escape the quotes: class="something".

    Edit: Dammit, forums stripped out the slash. To escape quotes put a backslash directly before the ”

    fantastic, thanks very much for your time
    I’ll give it a try straight away

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Applying a class to the blogroll <ul>’ is closed to new replies.