Forums

Blogroll questions (11 posts)

  1. dropandhop
    Member
    Posted 4 years ago #

    Hi all,

    I tried to find these answers out there, but to no avail. So I hope that someone could help me.

    I was wondering how to change a few things with my blogroll.

    1. My blogroll is currently listed in my sidebar under the word "Blogroll". I was trying to find the place where I can change what that word displays as.

    2. For some reason my blogroll is not currently listing the links under their various categories. It is just listing all the links in one lump-sum, not broken down. Even though, I have them all assigned to various categories in the admin page.

    Thanks for any help you can provide.
    A

  2. Adam Brown
    Member
    Posted 4 years ago #

    Are you using widgets or a manually created sidebar?

  3. Adam Brown
    Member
    Posted 4 years ago #

    I looked at your site. It appears you are not using widgets. They would make your life easier. Look here to learn how to tweak your theme to use widgets:

    http://automattic.com/code/widgets/themes/

    But since you're not using widgets...

    1) Open up your theme's sidebar.php and change the word "blogroll" to whatever.

    2) Look at this: Template_Tags/wp_list_bookmarks

  4. dropandhop
    Member
    Posted 4 years ago #

    Adam,

    Thanks for the advice and for taking the time to check out my site.

    I was thinking about using widgets, but I am pretty content with the off the shelf sidebar.

    Since I know how some of my theme works I already took a look at sidebar.php and I didn't see any mention of "blogroll". As per your reply, I checked it out again and I still don't see it. It references things like:
    widget_links
    dynamic_sidebar

    Any ideas?

    I'm using the BlixKrieg theme, which is basically a mod of Kubrick and the original Blix.

    Thanks again,
    A

  5. Adam Brown
    Member
    Posted 4 years ago #

    Paste a copy of sidebar.php into http://wordpress.pastebin.ca/

  6. ClaytonJames
    Member
    Posted 4 years ago #

    If this is poor practice, someone please correct me, but I think what you are looking for can be achieved by doing the following:

    Before you do this, make backup copies of any file you intend to alter, just in case.

    Open functions.php in the theme folder and find the following:

    function widget_links() {
            ?>
            <h2><em>Blogroll</em></h2>
    	<ul class="links">
    	<?php get_links('-1', '<li>', '</li>', '', 0, 'name', 0, 0, -1, 0); ?>
    	</ul>
    	<?php

    change it to this:

    function widget_links() {
            ?>
            <h2><em>Blogroll</em></h2>
    	<ul class="links">
    	<?php get_links_list(); ?>
    	</ul>
    	<?php

    The "php get_links_list" being the portion you want, and you can change the word "Blogroll" to whatever you want as well.

    I believe that may very well change the view to one including link categories that you have provided from the admin panel. I hope I have not misunderstood what you are trying to do.

  7. Adam Brown
    Member
    Posted 4 years ago #

    @Clayton:

    I'm guessing you went the extra mile and downloaded a copy of BlixKrieg to find that code?

    That's not poor practice and should work fine. But be advised that get_links_list() is deprecated as of 2.3, so it may cause an error in future versions of WP. wp_list_bookmarks() is now preferred.

  8. ClaytonJames
    Member
    Posted 4 years ago #

    Thanks!I appreciate the feedback... I'm still struggling just to wrap my head around the basics!

  9. dropandhop
    Member
    Posted 4 years ago #

    Thanks for being on top of this one guys!

    I have pasted my sidebar file into: http://wordpress.pastebin.ca/856162

    Clayton- I will definitely try your solution if Adam can't get anywhere with this.

    Thanks once again,
    A

  10. Otto
    Tech Ninja
    Posted 4 years ago #

    That theme looks widget enabled, so I'd take this opportunity to just go ahead and start using widgets.

    The built in Links widget will display the blogroll correctly, and by categories. However, if your theme is overriding it (as Clayton suggests) then you may need to edit that like he says, or remove the theme's overriding functions.

    BTW, theme authors that do this sort of thing should be shot. Make your theme work without customizing the bloody widgets. If your theme doesn't work with the default wp_list_bookmarks function, then your theme is broken, not the function. Sidebars should be unordered lists, not divs. Learn to design better.

  11. dropandhop
    Member
    Posted 4 years ago #

    Otto,

    Thanks. I hear ya, I thought it was kind of silly myself!

    When using widgets, is there a way to change what is displayed on the sidebar per page? For example, before I activated the sidebar widget my "blog" pages had a different sidebar then what was displayed on any other page.

    After looking a bit, I don't see a way to do this. The closest I got was: http://wordpress.org/support/topic/141857?replies=3

    Which I'm not sure would work because I pretty much only want the sidebar displayed on my home page and any blog pages (not on the static pages, which is most of my site).

    Thanks!
    A

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags