WordPress.org

Ready to get started?Download WordPress

Forums

How to remove "blogroll" text above blogrolllist. (18 posts)

  1. fUzZy89
    Member
    Posted 7 years ago #

    Hi. I am trying to remove the text "Blogroll" above the links. In sidebar the code is:

    
    <h3>Lenker</h3>
    <?php get_links_list(); ?>
    

    When I view the source I see:

    
    
    <li>
    	<h3>Lenker</h3>
    	<li id="linkcat-2" class="linkcat"><h2>Blogroll</h2>
    
    <ul>
    <li>link</li>
    <li>link</li>
    <li>link</li>
    </ul>
    </li>
    

    So... <?php get_links_list(); ?> generates a h2. I want to hide that h2 or edit it to h3. How do I do that? I have been looking trough the WP settings, but with no luck :(

  2. Class
    Member
    Posted 7 years ago #

    Maybe you could use wp_list_bookmarks if you're using WP2.1.

  3. fUzZy89
    Member
    Posted 7 years ago #

    Ok. How? I am not good at php :/

  4. Class
    Member
    Posted 7 years ago #

    In the file you postet from above, try replacing

    <h3>Lenker</h3>
    <?php get_links_list(); ?>

    with

    <h3>Lenker</h3>
    <?php wp_list_bookmarks(); ?>

    See the link I provided for more information.

  5. fUzZy89
    Member
    Posted 7 years ago #

    Ok. I tried that now, but I got the same result :(

  6. Bodhipaksa
    Member
    Posted 7 years ago #

    I seem to recall you need to go to "links" in your admin area and then "link categories". "Blogroll" is a link category and you can change the name.

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

    Do you want to actually *remove* it, or just change it? Because you can do either with various parameters passed to wp_list_bookmarks.

    I highly recommend that you upgrade to 2.1.1, BTW. The wp_list_bookmarks function has some bugfixes in it that might make this sort of thing a bit simpler.

    Anyway, read the codex link above, and pay special attention to these parameters:
    categorize
    title_li
    title_before
    title_after
    category_before
    category_after

    Using various settings for those will give you various results along the lines you're talking about.

  8. fUzZy89
    Member
    Posted 7 years ago #

    Haecceity: That changed the text, but I want to either remove the header text or edit the h2 to h3...

    Otto42:
    Well, how do i put that into this code? :
    <?php wp_list_bookmarks(); ?>

    What code shall I use if I just want to change h2 to h3 (or just remove the <h2>text</h2>

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

    fuzzy89: Read the documentation!
    http://codex.wordpress.org/Template_Tags/wp_list_bookmarks

    There are several *examples* that show you exactly how to put those into that code.

    Read them. Try them. Try different things. This is not a difficult thing to figure out. It should take you about 15 minutes, maximum.

  10. fUzZy89
    Member
    Posted 7 years ago #

    Ok, tried a bit. But cant get it to work :(

    Why dosent this code work?:
    <?php wp_list_bookmarks ('title_before' => '<h3>', 'title_after' => '</h3>'); ?>

    The sidebar disaperes when I use that code...

  11. fUzZy89
    Member
    Posted 7 years ago #

    Hey!

      <li>
    <?php wp_list_bookmarks ('title_before=<h3>', 'title_after=</h3>'); ?>
      </li>

    worked! Thank you so much guys for the help! :)

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

    Another way to do it (and the way shown in all the examples) would be wp_list_bookmarks ('title_before=<h3>&title_after=</h3>');

  13. polle001
    Member
    Posted 7 years ago #

    And as the title of the question says, hide the "blogroll" word, but let the links display under the h3 ?

    I want to show my links, but not the blogroll word under my title.

    Any ideas ?

    Thanks.

  14. modifiedcontent
    Member
    Posted 7 years ago #

    I'm struggling to get rid of "BLOGROLL" as well.

    And I'd like to show the links not with list item tags, but just a line break behind each link.

    I don't know PHP, so I understand very little of this stuff. I understand you can do all kinds of interesting things within ('arguments'), but I just want to remove BLOGROLL etc.

    Do I really need lots of code for that? Can't I just edit some html in another file?

    This sounds like what I need:

    title_li
    (string) Text for the heading of the Page list. Defaults to '__('Bookmarks')', which displays "Bookmarks" (the __('') is used for localization purposes). Only used with categorize set to 0 (else the category names will be used instead). If passed a null or empty value (''), no heading is displayed, and the list will not be wrapped with

      ,
    tags.

    But I have no clue what to do with it and the "examples" only add to the confusion.

  15. mafajones
    Member
    Posted 7 years ago #

    Same problem here, as modifiedcontent has listed before. I want to get rid of the title but have almost null skills in PHP matters.

    An example on how to call the blogroll function but without the heading title would be really sweet.

    Thanks in advance.

  16. mafajones
    Member
    Posted 7 years ago #

    A friend of mine seems to got the problem solved. After a while trying with different combos of the php call, he asked me to try the following (which worked fine for me):

    <?php wp_list_bookmarks('categorize=0&title_li='); ?>

    Hope you can find it helpful.

    Regards.

  17. abouthere
    Member
    Posted 7 years ago #

    mafajones - thank you v much - solved a problem I had too.

  18. martinjy
    Member
    Posted 6 years ago #

    All - I couldn't follow the php babble in the codex either, and agree that Otto42 was not particularly helpful.

    However, I did manage to figure out a workaround:

    1. Go to Blogroll > Add Link.
    2. Add a new category. Name it as whatever you want to appear in the sidebar, eg Feeds I read.
    3. Go to Manage Blogroll.
    4. Edit the category for each link and change to your new category.
    5. Use the standard wp_list_bookmarks code in your sidebar (<code><?php wp_list_bookmarks('title_after=&title_before='); ?>)

    Enjoy!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags