WordPress provides a way to list your favorite links on the sidebar.
None of my themes that you download from this website has that in-built.

However when you copy the ‘piece of code’ from the WordPress default Installation into the page that is using one of my themes, it really doesnt look good and also makes the page invalid.

here is the fix to the problem. Use the following code in your index.php.


<h2><?php _e('Links'); ?></h2>
<ul><?php get_links('-1', '<li>', '</li>', ' '); ?></ul>

Thats it !

13 Responses to “Fix for Links !”

  1. Patricia says:

    Thanks! :-) I was in fact wondering how to do that…

  2. trench says:

    I was wondering how to include trackbacks to the templates. They dont seem to be included.

  3. Patricia says:

    True! Trackbacks would be nice too. Although when you click to comment, there“s trackback into, just like above, but having the trackback link right next to the comments link would definitely be nice.

  4. Theme Porter says:

    I believe even the default template from wordpress doesnt differentiate between trackbacks and comments.

    I am looking into the code right now, and hopefully will find some solution to this.

    Thanks.

  5. Damon says:

    i get errors undefined ” ‘ ” or somthing when i add this.

  6. Damon says:

    I figured it out for any other n00bs needing to know, this works for the georgia template anyways, probably somthing the same for the rest of the themes on this site.

    < ?php _e('Linkage:'); ?>

      t_links_list(); ?>

    and in the link catagory, just remove the name if you dont want it to say Links twice, i only have 1 catagory atm.

  7. ThemePorter says:

    Damon,

    Please use this tool
    http://centricle.com/tools/html-entities/
    to encode your PHP / HTML, and then paste it on to the comments box.

    Thanks.

  8. Damon says:

    Ok hope this one works, its nothing special but i had problems getting the one posted to work so I used this .

    <h2><?php _e(’Linkage:’); ?></h2>
    <ul><?php get_links_list(); ?></ul>

  9. Daniel says:

    I was wondering if anyone might know how to get the nice lines between the links like the ones between the different catagories. You can see it on my page: Otherwise everything is awesome and thanks for the templates.

  10. Laen says:

    I like my links to be split up by category in the sidebar, like how “get_links_list()” does it, but _not_ as a bulleted list.

    To that end, I hacked up get_links_list() to get “get_links_sidebar()”, provided in this file: linksidebar.phps. Stick that in your themes directory, “require” it at the top of your index.php, and call it with <?php get_links_sidebar(); ?>.

  11. Doogie says:

    I still cannot get mine to display various link catagories. I only get the basic links.

  12. Donna Anderson…

    The 3186 Deborah Mitchell blog…

  13. Anna Levine says:

    aminoformic velocipedal dioptograph radiographical unslipped countervote monoblepsia thirdness
    Guardian Pest Control
    http://jukeboxking.com.au

Leave a Reply