WordPress.org

Ready to get started?Download WordPress

Forums

Help with Links (4 posts)

  1. elayna
    Member
    Posted 8 years ago #

    I would like to create a page for links which I did and I thought I did everything right when I got into edit the links are there but they don't appear on the page. What I would really like is an area, page is fine of links divided by category is there something like that out there?
    Thanks

  2. moshu
    Member
    Posted 8 years ago #

  3. aetherFox
    Member
    Posted 8 years ago #

    Well, you could go into the Write section of your administration panel, and then write a page. All you need in the page is something like this:

    <ul>
    <?php get_links_list('id'); ?>
    </ul>

    To see more information, check the Codex on template tags, down in the Link Manager section. Using wp_get_links() for example, you can customise the output further, but the above code generates a clean, unordered list of the links organised by category.

    Once you have written the page, call it whatever you like, lets use Links for example. Check the page slug (it should be links if Links was your title), and then you can visit the page using http://yoursite/links/.

  4. moshu
    Member
    Posted 8 years ago #

    @aetherFox,
    I understand what you mean, but the way you posted I am afraid might be confusing for a newbie...
    Actually you can not write PHP code in a Page. In order to make it work you have to create first a page template; in this case the best solution is to have a links.php template which is recognized by WP as special file, and put the above code into that.
    Create a Page using that template and do not put anything in the content.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.