WordPress.org

Ready to get started?Download WordPress

Forums

Link categories will not display (9 posts)

  1. william_kelly
    Member
    Posted 5 years ago #

    From a new 2.6 install, I can create link categories in the dashboard but they will not display on the blog. I can add links to these link categories in the dashboard, but again they will not display on the blog. Only links created under the default "blogroll" will display. My webhost installed 2.6 for me. If this is a problem on their end, can you tell me what I can tell them in order to point them to a fix. Thanks!

  2. Glenn Ansley
    Member
    Posted 5 years ago #

    This may be related to the way your theme is coded. What theme are you using?

  3. william_kelly
    Member
    Posted 5 years ago #

    Thank you blepoxp! It is the theme. I have about 6-8 uploaded, trying to decide on one and unfortunately this issue occurs on most of them including "bookblog" and "petrona". But there are one or two themes in which link categories do display so I know that is what it is. Thanks.

  4. Glenn Ansley
    Member
    Posted 5 years ago #

    if you're comfortable editing PHP, you can replace the following in sidebar.php and that should fix it (this is for the bookblog theme)

    replace
    <?php get_links(-1, '<li>', '</li>', 'between', FALSE, 'name', FALSE, FALSE, -1, FALSE);?>

    with
    <?php wp_list_bookmarks(); ?>

  5. william_kelly
    Member
    Posted 5 years ago #

    Ok, I wil try this. thank you so much!

  6. Glenn Ansley
    Member
    Posted 5 years ago #

    any luck?

  7. Jonas Grumby
    Member
    Posted 5 years ago #

    I'm having the same problem with the Blue Dream theme.

    I tried changing sidebar1.php from:

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

    to:

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

    Which then showed my new categories and the links under them, but the category titles become indented, which looks bad.

    To stop the cat titles from indenting, I changed:

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

    to:

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

    (i.e. I removed the UL tags around it)

    That gets rid of the indent but then the "Blogroll" title appears twice. How do I stop it from doing that?

    I put it back to the original way for now, just to keep things from getting confused. This is my first WP installation, so I'm a little bit leery about jumping too far ahead too fast. Any feedback is appreciated. Thanks.

  8. D_beagle
    Member
    Posted 5 years ago #

    Hi,
    Been reading about this and did some research on how to get this done.

    I tried a method after reading from the following link:
    http://codex.wordpress.org/Template_Tags/get_links

    This is what I did:
    I am using the theme - Live 1.1.6 and modifying it to my needs.

    From the "sidebar.php", I found the following code:

    <div>
    <h3 class="title-1 block"><?php _e('Links'); ?></h3>

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

    </div>

    then made a copy of the code for each category I would like to display.

    I then changed the title of each link I want to show from the ('Links') line.

    The number at the line <?php get_links('2', ....> actually corresponds to the link categories I created. So if I have 5 different categories, I just make 5 copies of the code and just change the number to what I want the site to show.

    Since this works for me, I didn't try the "wp_list_bookmarks" sequence.

    You can have a peek at my site - http://www.petsturf.com to see what I did.

    The modifications to the site is still ongoing though.

    Hope this helps.

  9. Jonas Grumby
    Member
    Posted 5 years ago #

    Do you have to manually edit that any time you add or remove a link or link category?

    I haven't had a chance to look any further into it. The client hasn't asked. I just wanted to figure it out for myself, for future reference.

Topic Closed

This topic has been closed to new replies.

About this Topic