• Resolved nickaster

    (@nickaster)


    HI there. I’m trying to figure out how to make my blogroll (links) look a little different from the rest of the sidebar. Right now, the only clue I have that gives me any idea how to control the sidebar is this from functions.php:

    if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h3>',
            'after_title' => '</h3>',
        ));

    Sure, that seems clever. Slaps a div around each one and gives it an h3 title. The problem is that all my blogroll categories get the h3 treatment as if they were headers and I can’t find any place to give the entire blogroll a header. This is totally insane. Where in the name of god is the code hidden that spits out the blogroll by default? How do I edit it?

    To clarify, I’ve read this page: https://codex.www.ads-software.com/Links_Manager

    And I can find nothing in any of my templates that uses either of the variables that page says you need – * wp_get_links() AND wp_get_linksbyname()

    I have utterly no clue where these things are coming from other than a widget that exists. But how can I edit the widget? My mind is blown!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Where in the name of god is the code hidden that spits out the blogroll by default?

    Have you actually tried looking in the source code of your pages? You’ll find that your links have both a class and an id that you can use to style them.

    If you want to get a little more creative with your link list, I’d suggest you stop using the Links widget and generate your links using wp_list_bookmarks in sidebar.php.

    Thread Starter nickaster

    (@nickaster)

    okay good point. Yes, I did look at the source code, but I still can’t figure out how to put a header on the whole thing. I’ve been playing with the functions.php and tried this:

    function real_links() {
    echo ‘
    <div id=”blogroll”><h3>Links</h3>’
    .wp_list_bookmarks().
    ‘</div>’;

    }
    wp_register_sidebar_widget(‘real_links’, __(‘Blogroll’), ‘real_links’);

    Which sort of works, but somehow the list does not appear inside the <div> that I set up. Why would that be?

    I can fake it by making a widget that just spits out “Blogroll” and stick it on top, I suppose

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Non Stanadard Blogroll Code in Sidebar’ is closed to new replies.