WordPress.org

Support

Support » How-To and Troubleshooting » How to remove “blogroll” text above blogrolllist.

How to remove “blogroll” text above blogrolllist.

  • 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 🙁

Viewing 15 replies - 1 through 15 (of 17 total)
  • Maybe you could use wp_list_bookmarks if you’re using WP2.1.

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

    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.

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

    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.

    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.

    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>

    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.

    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…

    Hey!

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

    worked! Thank you so much guys for the help! 🙂

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

    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.

    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.

    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.

    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.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘How to remove “blogroll” text above blogrolllist.’ is closed to new replies.
Skip to toolbar