• tjinh200

    (@tjinh200)


    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); ?>

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter tjinh200

    (@tjinh200)

    any ideas?

    tahongawaka

    (@tahongawaka)

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

    Thread Starter tjinh200

    (@tjinh200)

    i’ve changed it, and i’m still getting only one category: “Links” … not any others …

    iand

    (@iand)

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

    Thread Starter tjinh200

    (@tjinh200)

    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?

    Thread Starter tjinh200

    (@tjinh200)

    also, wp_get_links isn’t working for me …

    iand

    (@iand)

    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.

    tahongawaka

    (@tahongawaka)

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

    Thread Starter tjinh200

    (@tjinh200)

    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?

    Thread Starter tjinh200

    (@tjinh200)

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘adding to sidebar’ is closed to new replies.