• I am wanting to show only one of my links categories on my sidebar.. how do I specify that in the code? This is what I have

    <!– start sidebar item –>
    <div class=”sidebar”>
    <h2>Links</h2>
    <ul class=”sidebarul”>
    <?php get_links(‘-1’, ‘

    • ‘, ‘
    • ‘, ‘
      ‘, FALSE, ‘name’, FALSE, FALSE, ‘-1’, TRUE, TRUE); ?>

      </div>
      <!– stop sidebar item –>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Change the first -1 to the number of the category you want to display. So it would read something like this instead:

    <?php get_links('5', '

    Be sure to take out the minus sign as well as the number one or it will probably break something.

    http://codex.wordpress.org/Template_Tags/get_links

    <?php get_links(category, 'before', 'after', 'between',
    show_images, 'order', show_description,
    show_rating, limit, show_updated, echo); ?>

    “category
    (integer) The numeric ID of the link category whose links will be displayed. If none is specified, all links are shown. Defaults to -1 (all links).”

    Change the ‘-1’ (first argument in get_links()) to the link category numeric ID you want.

    http://codex.wordpress.org/Template_Tags/get_links

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show only certain link categories on sidebar?’ is closed to new replies.