WordPress.org

Forums

adding to sidebar (11 posts)

  1. tjinh200
    Member
    Posted 10 years ago #

    yet another sidebar question...

    in my theme, all my links, regardless of category are placed under the title "Links" ... how can i make them separate and show another category?

    current code:

    <div class="title"><?php _e('Links'); ?></div>
    <?php get_links('-1', '', '<br />', '<br />', 0, 'name', 0, 0, -1, 0); ?>

  2. tjinh200
    Member
    Posted 10 years ago #

    any ideas?

  3. Tahongawaka
    Member
    Posted 10 years ago #

    Try changing get_links('-1'...) to get_links_(-1...) to see if anything changes. The first parameter should be an integer, not a string.

  4. tjinh200
    Member
    Posted 10 years ago #

    i've changed it, and i'm still getting only one category: "Links" ... not any others ...

  5. iand
    Member
    Posted 10 years ago #

    Try using wp_get_links instead. Alternatively, I use wp_get_linksbyname('category name') and call each cat separately.

  6. tjinh200
    Member
    Posted 10 years ago #

    could i use the following code for that?:

    <div class="title"><?php _e('Links'); ?></div>
    <?php wp_get_links('-1', '', '
    ', '
    ', 0, 'name', 0, 0, -1, 0); ?>

    or

    <div class="title"><?php _e('Links'); ?></div>
    <?php wp_get_linksbyname('General'); ?>

    or something along those lines perhaps?

  7. tjinh200
    Member
    Posted 10 years ago #

    also, wp_get_links isn't working for me ...

  8. iand
    Member
    Posted 10 years ago #

    Extract from my sidebar:
    <div class="content">
    <?php _e('Daily:'); ?>
    <ul>
    <?php wp_get_linksbyname('Daily'); ?>
    </ul>

    I would guess that your second suggestion should work.

  9. Tahongawaka
    Member
    Posted 10 years ago #

    Just for shits & giggles, change your get_links line to get_links(), without any parameters. See if anything changes.

  10. tjinh200
    Member
    Posted 10 years ago #

    well, apparently my theme won't accept the "wp" part of the get_links tag, so i deleted that part and i can seemingly make it work, thanks for the "link by name" suggestion, definitely helpful...is there a place to find descriptions of the parameters set in the get_links tag?

  11. tjinh200
    Member
    Posted 10 years ago #

    oops, i could probably see that in Links > Link Categories huh? ;)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.