WordPress.org

Ready to get started?Download WordPress

Forums

adding in a second blogroll (27 posts)

  1. Tawanda
    Member
    Posted 7 years ago #

    I'm guessing on the version btw.

    My blog has a blogroll/link section labeled "Inspiration" in my sidebar. I want a second blogroll, labeled something else, to hold different links. How do I do this in the html? I managed to get a new title up but not the place to add the links in.

  2. rudolf45
    Member
    Posted 7 years ago #

    You shouldn't mess anything with the html.
    Just go admin > Blogroll > Add Link
    when there, look on the right and add your new link category ("something else") and add a new link. Make sure you check the right category for it.

  3. Tawanda
    Member
    Posted 7 years ago #

    I've long had categories for my links but they aren't visible on the page, only on the organizational end within my dashboard. I want an entirely different section, like a "blogroll2" to list entirely different kinds of links (business versus personal). I'm working in the html on my style sheet in ftp, which is new to me. When I copy the code from my existing blogroll it copies all the links again too.

    You see, I know just enough to keep me from being a web idiot and just enough to make me dangerous but not enough to actually know what I'm doing!!! bwwwhhahaahaaa

    You can see where I want this to go on the side bar of my site. "Blogging with flair" should be the second blogroll.

  4. rudolf45
    Member
    Posted 7 years ago #

    I really don't understand what are you doing "in your html on the stylesheet" (which is kinda nonsense, btw...).
    As I said, there is nothing you should mess around with code and things like that.

    All you need is the proper template tag in your sidebar:
    http://codex.wordpress.org/Template_Tags/wp_list_bookmarks
    and it will do the job for you.
    Maybe the problem is with the code for your existing blogroll! What is the line to display your links?

  5. Tawanda
    Member
    Posted 7 years ago #

    Why is nonsense? In my ftp I open the style sheet to customize my template. The code in there is called html right? So what is nonsensical about that?

    I'm not sure how the problem could be my existing blogroll....it works perfectly fine and my issue isn't with the first one but in wanting a second one. But here is the code for the first:

      <?php get_links('-1', '
    • ', '
    • ', '
      ', FALSE, 'id', FALSE, TRUE, -1, FALSE); ?>

      Like I said, just duplicating that code also duplicates all my current links.

  6. Tawanda
    Member
    Posted 7 years ago #

    and I'm not sure why but when I hit "post" it took a straight line of code and made it it look like the above. That is not how it looks on the sidebar.php

  7. Tawanda
    Member
    Posted 7 years ago #

    bumping this back up to the top. I was told this forum was the best place to go for advice...sure hope someone can help!

  8. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Why is nonsense? In my ftp I open the style sheet to customize my template. The code in there is called html right? So what is nonsensical about that?

    The code in the stylesheet is called CSS, not HTML.
    The code in the template is a combination of HTML and PHP.
    The stylesheet is part of the template, not the template itself.

    And in any case, none of what you are talking about is necessary to make another Link category for a second blogroll.

    See this:
    get_links('-1'...
    That will display links for *all* your link categories. All you have to do is to a) make the category and b) put links in it, and it will show up right there, all by itself. You don't need to make another copy of that code.

    Also, you talk about using get_links(). If you're using wordpress 2.1 and up, you should switch to using wp_list_bookmarks() instead. More info here: http://codex.wordpress.org/Template_Tags/wp_list_bookmarks

  9. Tawanda
    Member
    Posted 7 years ago #

    Thanks Otto...like I said above, I'm still learning and the "lingo" is my weakest link ;-).

    I wish I could say this isn't still greek to me but it is. If I don't need to be working on my style sheet, can you tell me where to make that category and put links into it? I think I said above that my current link categories in my dashboard do not separate my current links at all and they are all in one blogroll.

  10. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    I think I said above that my current link categories in my dashboard do not separate my current links at all and they are all in one blogroll.

    Right. You have to create a new category, like rudolf45 said above.

    In other words, you've been given the right answer. All you have to do is to read it.

    Go to Blogroll->Add Link. Over on the right hand side, you can create an entirely new category, right there, as you add the first link to it. Call it "Blogroll 2" or whatever the heck you like. Then add the link to it. Then add more links to it. And so forth.

    After you have your other category for your second blogroll, then you can go change the template to show the links in a different place, if you want. Like I said, you should probably use the wp_list_bookmarks function, as it's simpler to use and mess with.

  11. Tawanda
    Member
    Posted 7 years ago #

    Gee Otto thanks for condescending down here to my level where
    people ask for clarification and support on a um...support forum.

    "In other words, you've been given the right answer. All you have to do is to read it."

    Interestingly enough, the first part of your (and rudy's) suggestion has already been tried several times on my blog and does not get the desired result. I'll give the second half of your reply some more effort but I did go to that bookmark function earlier (the first time I managed to make out the words and um, read it) and was not certain which part goes where in my template. Really Otto, if clarifying for someone still learning is too annoying for you, feel no need to reply yet again.

  12. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Interestingly enough, the first part of your (and rudy's) suggestion has already been tried several times on my blog and does not get the desired result.

    Then you should explain what result it does get. Seriously, saying "it doesn't work" over and over when it clearly *does* work... well, that's not helpful at all.

    You asked a question. It got answered. If the answer is unacceptable, please explain why it is unacceptable so that more information can then be given. Because repeating the same thing over and over and going off into other unrelated areas, well, that doesn't get as good of a response, as you have learned.

    We're happy to answer any question you ask, but the answer will only be as good as the question is.

    The Blogroll/Links are basically just a list of categorized Links. The get_links or wp_list_bookmarks functions are the calls in your template that actually display those links. Where you put them depends on your template and where you want them to show up.

    You say you want a second list. Okay. So we told you how to create one. The get_links command you're using will display those links. It might categorize them, it might not, but either way that's irrelevant to creating a second list of links. The content and the display of the content are two different things. So, if you want to display it elsewhere/differently/etc, then please describe how/where you want it to be displayed. Then, maybe, we can tell you how to do that. :)

  13. Tawanda
    Member
    Posted 7 years ago #

    Okay...I add links to my blogroll. I choose a category for them. On my sidebar it shows as ONE list of links and is not categorized in any other way than within my dashboard organization. I don't know how to make it clearer than that. You can look if you want. sixredheads.com. There is ONE list of links labeled "Inspiration", even though until yesterday I had 4 different categories (today I have two).

    I have gone and looked at the suggested bookmark sheet but again, it is not clear to me what one is to do with that information. It's language I'm only starting to become familiar with and I think I am still unapologetically at the stage where I need a bit of code and an instruction on where to put it; that page seems to indicate I need to construct it myself. Also, if I need to adjust my template, I've been told by my web designer that I need to do so in ftp and the style.css. If that is not the case, please tell me how I should do it instead. My template within my dashboard is not writable.

    When two people have a problem communicating and making sure they both understand one another, it is rarely all one
    person's fault, or in one person's ability to ask their question well enough.

  14. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Okay...I add links to my blogroll. I choose a category for them. On my sidebar it shows as ONE list of links and is not categorized in any other way than within my dashboard organization. I don't know how to make it clearer than that.

    Okay, the problem is that up until now, you had not made it that clear. Furthermore, you act as if we could see what you're talking about, when you had not posted the address of your blog until your last post.

    All we have to go on is what you tell us. If you don't say it, we don't know it.

    As for your particular issue, the problem is indeed the use of the get_links() code. You could probably replace that with just wp_list_bookmarks(); all by itself and see an immediate improvement.

    What you're going to do is to look at your theme's "sidebar.php" file. You can get it via FTP or whatever. Ignore the style.css, you're not going to modify that.

    In the sidebar.php, you'll likely find something like this:

    <h2>Inspiration</h2>
    <?php get_links('-1', '...
    ...blah blah...
    ?>

    Replace that code with just this:
    <?php wp_list_bookmarks(); ?>

    Yes, get rid of the Inspiration. Why? Because the wp_list_bookmarks() is going to do that for you.

    Save it, and FTP the updated sidebar.php file back to the site, where you found it.

    Now, when you load your page, you'll get something new. Instead of "Inspiration", you'll get "Blogroll" and your other link categories in separate chunks. You can rename the "Blogroll" or whatever the names of the categories are on the Manage->Categories admin page. You can add new Link categories, and they'll all appear too (as long as they have links in them anyway).

  15. Tawanda
    Member
    Posted 7 years ago #

    My apologies for not posting my site sooner; by clicking on my "member" name the link is visible and I wrongly assumed you would have checked it.

    Thank you for the detailed instructions. Is this the code I should place in it's entirety?

    <?php wp_list_bookmarks(); ?>

    My apologies as well on the style.css confusion. I had been doing this work in the sidebar.php; I have been working in so many places this week, doing things all completely new to me, that I simply got confused and mixed them up. I didn't like your tone but I wanted to apologize for my contribution.

  16. Tawanda
    Member
    Posted 7 years ago #

    Hey Otto...one more question. I did it and it worked great. But from the link section down everything has a diamond bullet next it. How can I remove them?

  17. ColourDreamer
    Member
    Posted 7 years ago #

    She was always perfectly clear to me, fellas. Wish I came sooner. I know how to fix your second problem, too.

    Use this code:

    <?php wp_list_bookmarks('between=\n); ?>

    Tell me if that works, you might also use this code:

    <?php wp_list_bookmarks('before=&after=
    '); ?>

    I hope one of those works, I'm unable to test it at the moment.

    Or you might want to try this:

    <?php wp_list_bookmarks('before= &after=
    '); ?>

    ONE of those should work, if not, try a space after before=

    Sorry, I'm in a super rush, so I can't test it.

    If you want to separate the two lists, say on different sidebars or something, use this code:

    <?php wp_list_bookmarks('category=#'); ?>

    Good luck! I'll try to come back to check on ya, but I have a huge project going on. :-)

  18. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    I'm not sure what ColourDreamer was trying to explain, but to fix the bullet problem, just change the code to this:

    <?php wp_list_bookmarks("category_before=&category_after="); ?>

    That will eliminate the LI's being added around each category list.

  19. Tawanda
    Member
    Posted 7 years ago #

    Colordreamer~ thanks for the effort; I wasn't sure which code you meant to fix the second issue with the bullets.

    Otto, I changed it to the code you suggested but the diamond bullets are still there. sixredheads.com

  20. Zoutesnor
    Member
    Posted 7 years ago #

    When I look into your page sourcecode there's a </ul> tag right after your link to Three Rivers Market. Either try to remove this, or let it be followed by a new <ul> tag.

  21. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Tawanda: No, the bullets are gone. Look next to the Inspiration and such.

    You still have bullets next to the Amazon thing and the book pictures, but that appears to be coming from some other bit of code in your sidebar, not from the links code.

    Zoutesnor: That UL you're referring to is correct and is supposed to be there. The problem is the LI with an ID of "amazon-product".

  22. Tawanda
    Member
    Posted 7 years ago #

    I'm getting confused again. I still see bullets from my nanowrimo link on down. They were not there until yesterday, when I changed my bookmark code to what Otto suggested.

    What is this other issue, the

      you guys are talking about?
  23. Tawanda
    Member
    Posted 7 years ago #

    'k, I put ul in brackets and then it didn't show up. Guess that is a code no-no? sigh.

  24. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    When you paste code on the forums, use the backticks to surround it. Or click the "code" button.

    As for the bullets, those are caused by <li> tags that surround your nanowrimo link, your amazon links, etc. That is code that is in your sidebar *after* the wp_list_bookmarks() piece. Those are cause by something else. I don't know what you changed to create those, but without seeing your code, I cannot tell you how to fix them.

    Try this: Go to http://wordpress.pastebin.ca/ and paste your entire sidebar.php file into there. Then post the link back here. This will let us see your code and tell you what to do.

  25. Tawanda
    Member
    Posted 7 years ago #

  26. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    You deleted an extra <ul> by mistake when you were putting the wp_list_bookmarks code in.

    Add a <ul> immediately after <?php wp_list_bookmarks("category_before=&category_after="); ?> and that will correct it.

    Or copy and paste the file from this fixed version:
    http://wordpress.pastebin.ca/438668

  27. Tawanda
    Member
    Posted 7 years ago #

    Thanks!!! That's much better!

Topic Closed

This topic has been closed to new replies.

About this Topic