• Hi there,

    Is there anyone with a template which enables me to display links on a Page?

    Thanks!

    Regards,
    Dennis

Viewing 8 replies - 1 through 8 (of 8 total)
  • Do you mean some kind of theme feature that allows you do put links in the main content as they are in the sidebar?

    If so, cannot you just add them to the content with the Post/Page editing window?

    what sorts of links?

    if you’re wanting to use the links stored in your blogroll, you could create a seperate template page strip out the stuff that deals with posts and add the tag in to pull in your blogroll… if you’ve done a good job of organizing them into categories you can display them based on that…

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

    Thread Starter betwixt

    (@betwixt)

    Moodles,

    haha! You’re right. I can just add them manually. Didn’t think of that, lol.
    I’m not at all good with php coding, and frankly don’t have the time for it. I thought maybe there’s a friendly person here who knows what template to use so that when I add links to blogroll (what’s displayed by alot of themes in the sidebar), it will display them on a Page. (Instead of the sidebar).

    Regards,
    Dennis

    Don’t worry about it… sometimes we end up thinking so hard we bypass the answer.

    I thought maybe there’s a friendly person here who knows what template to use so that when I add links to blogroll (what’s displayed by alot of themes in the sidebar), it will display them on a Page. (Instead of the sidebar).

    1. make a copy of your index.php file in your theme directory.
    2. strip out everything relating to the post functions.. a possible example of what you might be left with…

    <?php get_header(); ?>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    </body>
    </html>

    3. add in (in the above example it would go before the footer call)
    <?php wp_get_links(1); ?>
    The (1) is saying to display all the links in your first blogroll category…
    you can make calls to another category by adding in another call and changing the number…
    4. save the file with a name like… linkpage.php
    5. place a static link to it somewhere in your index.php file

    It seems like I have the exactly same situation & tried out jetshack’s suggestion. However, all I get when I click the link to this “custom links page” is a “Call to undefined function: get_header()”.

    Anyone an idea on how to get this working?

    Appreciate your reading through,
    k.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    jetshack was on the right track, but left out a few things.

    You need to then add a header to the top of this page, so that it looks like this:

    <?php
    /*
    Template Name: Links Template
    */
    ?>
    ...

    Then make a new Page at Write->Page. Select your new Links Template from the Page Template pull down on the right hand side. Give the page a name, like “Links” or something, and Publish the Page.

    Then when you go to your new Page (http://example.com/blog/links/ , for example), it’ll work.

    Also, wp_get_links() should not be used. Use wp_list_bookmarks() instead.

    Great! Thank you a lot, this works perfect.

    k.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘links page’ is closed to new replies.