Forums

Random link list (6 posts)

  1. shadow
    Moderator
    Posted 5 years ago #

    Hi,
    I've been searching through the forums and looking online but can't find exactly what I am looking for. I have taken my links off my front page [created a links page]and would like to be able to display a small random list of links instead.
    Does anyone know of a way to show a small list of random links from the links in the database?
    Thank you to anyone who has a suggestion.

  2. podz
    Support Maven
    Posted 5 years ago #

    Matt uses a list of 12, but they seem updated by 'updated'
    It's the bar div here:
    http://codex.wordpress.org/User:Matt/photomatt.net/index.php

  3. holographic
    Member
    Posted 5 years ago #

    http://wiki.wordpress.org/get_links
    set a limit of however many links you want, and order by 'random'
    eg for a random list of 5 links:
    <?php get_links(-1, '', '<br/>', '', 1, 'rand', 1, 0, 5, 1); ?>

  4. shadow
    Moderator
    Posted 5 years ago #

    Thanks Podz.
    I gave it a try but not sure if I am not using it correctly or whether it is tied in to the updates and if so, I am not sure of how frequently that is happening etc...
    Thanks Holographic.
    It looks like this is doing almost exactly what I am aiming to do. Just one thing - something in here is calling the link descriptions too. If I want to turn that off how do I do so?
    Thanks to you both for your help :)

  5. holographic
    Member
    Posted 5 years ago #

    one of the parameters is 'show_description'. Set it to 0 (false)

  6. shadow
    Moderator
    Posted 5 years ago #

    Sorted,
    Thanks Holographic :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.