Forums

links manager, displaying links on a page (3 posts)

  1. mmusil
    Member
    Posted 3 years ago #

    I have a fairly large collection of links, filed into several categories. What I would like to do is create a page (i.e. mysite.com/links) that contains all my links, preferably separated by category. I've been searching through the plugins but have not yet found a way to do this. What do you recommend?
    Thanks!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Create a Links page template. Copy page.php in your theme and give the coped file a name like linklist.php. Open the new file in a text editor. At the very top of the file, add:

    <?php
    /*
    Template Name: Link List
    */
    ?>

    Next find where it says <?php the_content(); ?>. Immediately after this line, add the following:

    <ul class="linklist">
    <?php wp_list_bookmarks('title_li=&show_description=1&orderby=name&between=<br />'); ?>
    </ul>

    Save the file and upload it to your theme directory.

    Go to Admin/Pages/Add New. Give an appropriate name to your new page. and use the Page Template drop down under the Attributes Tab to assign your new Link List template to this page. Add some content if you like (it will appear just above your list of links on the public site) and then publish it. You should then have a page containing all of your links. See:

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

    for details of how to fine-tune the tag to suit.

  3. mmusil
    Member
    Posted 3 years ago #

    Wow, AWESOME!! Thanks esmi- it worked perfectly and it is exactly what i had in mind! You rock!

Topic Closed

This topic has been closed to new replies.

About this Topic