WordPress.org

Ready to get started?Download WordPress

Forums

Links Page (7 posts)

  1. miri
    Member
    Posted 9 years ago #

    Hello, I just ported my site over to WordPress and, so far, I'm loving it. I have a question, however, about links. Is it possible to have one page that pulls in all your links? I'd like to limit the number of links that show from each category in the side bar and then have a link to "more" afterwards which would take you to an archive page that lists out all the links.

  2. Lorelle
    Member
    Posted 9 years ago #

    There are Template Tags that will help you get specific links, like categories, Pages, and such. There are also various plugins that will help you get lists of related posts and most recent posts. Check the http://www.wp-plugins.net or http://www.wp-plugins.org for those.

  3. miri
    Member
    Posted 9 years ago #

    Those are getting links from posts, though, right? I meant straight links added via the Links Managment tool. I think I can call get_links(); to put all links on a page, but how do I create a page like this that WP understands and knows how to handle?

  4. moshu
    Member
    Posted 9 years ago #

    First you will have to create a new page template. In this case - for links - you can start from the index.php and do this:
    1. put on the top this
    <?php
    /*
    Template Name: Links
    */
    ?>

    2. Delete everuthing you don't need, including The Loop... possibly leave only the calls for header, sidebar and footer.
    3. Put the get_links(); call where you want the list to start
    4. Save it.

    Now go to Write Page section in admin panel, and for a new page select the "Links" template you just created from the drop-down menu. Do not (!) write anything in the page. Click create new page.

    Go to the Manage pages: write down the page ID.

    Create a link anywhere on your site to the page [as http://www.yoursite.com/index.php?page_id=X

    You're done :)

  5. miri
    Member
    Posted 9 years ago #

    Excellent! Thank you.

  6. Birdie
    Member
    Posted 9 years ago #

    Something is wrong here. I've followed these instructions until I get to the create new page part there is no drop down menu where I can choose the Links template.

    What am I missing? Can anyone provide a little more guidance for me.

    I posted the links.php in the template folder. Is this correct? My install does say WordPress 1.5. So I'm at a loss as to what to do now.

  7. moshu
    Member
    Posted 9 years ago #

    Is the template (=links.php) in the theme folder that is active? If it is in a non-active theme - the dropdown menu doesn't show up.
    (Please, notice the proper usage of the words template and theme.)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.