Web Tool Review Blog

wp_get_links producing blank entry


by Paul Flyer

I had a problem where the links on my other resources pages was create a blank entry. Like this:

  • Section Name
    • Link
  • The code I was using had an extra set of <li></li> tags in it:

    <li> <?php _e(’Section Name’); ?>
    <ul>
    <li><?php wp_get_links(N); ?></li>
    </ul>
    </li>

    Removing the extra set around <?php wp_get_links(N); ?> removed the problem.

    When using wp_get_links, remember that it inserts its own <li></li> tags. The code should look like:

    <li> <?php _e(’Section Name’); ?>
    <ul>
    <?php wp_get_links(N); ?>
    </ul>
    </li>

    05.04.2005 @ 8:45 AM — Filed under:

    Be sure to review our list of recommended web tools.

    TrackBack this entry

    Leave a comment

    Note: All comments are moderated. It may take 24-72 hrs for your comment to appear.