Support » Plugins » Link refering to random external adress

  • Hi,
    I’m trying to find a way or a plugin that allow me to put a link that will refer to random external link.

    for example, i want to put a button in a page that will refer to a different external website everytime based on a list that i can update.

    You know something that can help me do that?

    thanks in advance.


Viewing 15 replies - 1 through 15 (of 24 total)
  • Hi!
    I have a few doubts about what you are trying to do:
    1. Does the link text need to change as well as the actual link? Meaning, would a “Click here” text suffice or would it have to changed based on what site the link is taking you?
    2. Do you need this on the backend (WP admin) or frontend?
    3. Where would the button appear: pages, posts, home, all of the above, etc.?
    If you provide me with that information, I can definitely help you implement it.

    The link text doesn’t need to change. In fact, i was thinking of a button that refer to a different address every time someone click on it. Can be an image of a dynamic button.

    I would love to have it on accessible by wp-admin but i’m open to other solution. I would need to change the link list often adding entry and that.

    I would like the button to appear at some specific place but i would place that in a sidebar the majority of the time.

    Just for you to better understand my needs, i will make a website for a team and i want a link to go to a different member store each time someone click on the button to distribute the volume.

    Happy that you can help me. 🙂

    Yeah, no pb. I’ll write you a little plugin. What’s the name of your site?

    Wow, thank you very much. Didn’t though someone will give me a good solution like that. The name is Équipe Visalus Rimouski. We live in Quebec so my website will be in french.

    Just to add to that, i would need to have two random button that refer to 2 different list but that work exactly the same.

    Thanks again

    Hi kevenc,

    I just finished writing the plugin I promised you. It is fresh out of the oven so it’s not on the repository yet, but you can download it from here.
    I’ll post some instructions about how to use it in a while.



    EVR Random Links allows you to create a list of URLs and to randomly display links to any number of them in your posts, pages, and widgets.

    2. HOW TO USE:

    a. After activating the plugin, go to the plugin settings and create/paste links inside the text area one line at a time. You can load the link examples to see how you should do it.

    b. You don’t have to fill in the other settings since they will get populated automatically with the default values if left empty. However, you can also customize these at will.

    c. To display the links on your site, you have to paste the plugin’s shortcode handle inside your page, post, or text widget of choice:


    That shortcode will be replaced automatically by the necessary code to display the links.
    The shortcode also takes parameters which, if provided, will override the default settings set in the plugin’s option page. These parameters are:
    text –> the link text to display
    number –> the number of links to generate


    [evr-random-links text="Click here" number="1"]

    The code above will display one link with the text “click here”.

    d. IMPORTANT: If either:
    i. The link list on the plugin settings is empty,
    ii. The link list is broken or not inputted correctly, OR
    iii. The “number of links to display” option exceeds the number of links on your list
    The plugin will throw an error and let you know what the problem is.

    You can customize the look and feel of the links by tweaking the frontend stylesheet that is added to your site automatically when the plugin is active. The stylesheet in question is called style.css and it is located inside evr-random-links/css.

    New temp link to the plugin.

    a very big thank you for that, i’ll check it and let you know.

    hi, just installed it but i cannot find how the random work. It seems to always point to the first link i’ve put in the list and no random. I tried on a few browser just to make sure and i didn’t found how to make it work.

    Am i doing something wrong?

    Thanks again for all your help.

    Hi Kevenc,
    I just checked and you are right: when the number of links to show is smaller than the amount of URLs on the list, only the first x number are shown randomly instead of showing links from the entire list.
    Let me work on it and get back to you.

    hi Marventus,
    Just to add to that, is that possible to have the possibility to duplicate and have more than one random list?

    Also, i would like to add it as a button link. I have shortcode in my site for that but i don’t know how to make it.

    Thanks again.

    One of the features of the plugin is that you can add as many lists as you like through the shortcode, one shortcode instance per list.
    About the button links, what exactly do you mean by that? You can style the links using CSS styles as suggested in 3. Additional Customization. If that’s not what you mean, could you share a link to any page of your site where you are using the desired button links?

    Where am i able to add a new list? I only have one and don’t see a way to add a new one.

    For the button, i’ll do it with the CSS then. Thanks.

    To add a new list, you would just insert the shortcode again. For instance:

    [evr-random-links text="Click here" number="2"]
    [evr-random-links text="Link" number="4"]

    Should output two link lists:
    1. One list with two links with the text Click here
    2. The other list with four links with the text Link.
    You can add lists to your widgets as well as your template files, pages, and posts.
    Let me look into the random issue and get back to you.

    Yes but if i do that i only refer to the same list.

    Also, the number define the number of link that will be showed but what i would like is to always have only one link that refer to different link on the page for every customer that come on the page.

    For example,
    Customer 1 come to one page. I’ve inserted the link on the sidebar. The customer click on the link, he goes to the first link on the list.
    Customer 2 come to the same page or on another one and click on the same link, the customer is redirected on the second on the list.
    And so on.

    That would be great also to open in a new window and keeping the actual site open.

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Link refering to random external adress’ is closed to new replies.