• Resolved growlydidge

    (@growlydidge)


    Hi.
    I’m wondering how to limit what links are displayed in the sidebar. I’m trying to cut down on what’s there, so I set up a links page using the Links Page plug in. I don’t want to remove all the links from the side bar, everything except the blogroll can go. Is there anyway I can do this? I’m not sure what to code into the sidebar.php file… is there something that will tell it to populate the section only with links categorized as blogroll? or is there a widget or plugin that will do it?
    I’ve searched all over the downloads and support forums but can only find info on creating links pages and totally deleting the links section.

Viewing 6 replies - 1 through 6 (of 6 total)
  • go to Links -> Manage Links
    and toggle the visibility of the links you don’t want to show?

    Thread Starter growlydidge

    (@growlydidge)

    I tried that, but then those links no longer show up on the links page.

    Thread Starter growlydidge

    (@growlydidge)

    I have managed to only display the blogroll by editing the widgets.php file. I changed the section that went:

    function widget_links($args) {
    // This ONLY works with li/h2 sidebars.
    get_links_list;

    }

    to:

    function widget_links($args) {
    // This ONLY works with li/h2 sidebars.
    get_links(1);

    }

    the only problem with this is that there is no title in the side bar… just the couple of links that i have categorized as blogroll.

    Like growlydidge said, you could just remove this line from your sidebar.php file.
    <?php get_links_list(); ?>

    Make a special block for it or something, like such:
    <!--start Blogroll box-->
    <h2>Blog Roll</h2>
    <ul class="menublock">
    <?php wp_get_linksbyname('Blogroll','orderby=name&show_description=0&show_updated=1') ?>
    </ul>
    <!--close Blogroll box-->

    And it will only call the Blog Roll links, and yet still will show the links for the links pages. Could use their “specific ids” on that page then.

    <!--start Friends box-->
    <h2>Friends</h2>
    <ul class="menublock">
    <?php get_links(2) ?>
    </ul>
    <!--close Friends box-->

    <!--start Friends box2-->
    <h2>Other Friends</h2>
    <ul class="menublock">
    <?php get_links(3) ?>
    </ul>
    <!--close Friends box2-->

    Or even the <?php get_links_list(); ?> on the Links page.. The number “2” and “3” in the second blocks, are the “IDs” of the specific Link Catagories by the way… I hope this helps.

    spencerp

    Thread Starter growlydidge

    (@growlydidge)

    Thanks. That did exactly what I wanted, better than my modification of the widgets.php file… I think I need to learn some more on php. Someone needs to make a widget for links that allows you to pick which show up… I would if I knew how… time to learn how.
    Thanks again.

    Thread Starter growlydidge

    (@growlydidge)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Partial display of links in sidebar’ is closed to new replies.