[resolved] Applying a class to the blogroll <ul> (3 posts)

  1. mickieluv
    Posted 10 years ago #

    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.

  2. maerk
    Posted 10 years ago #

    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 "

  3. mickieluv
    Posted 10 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic