How to add Random in Category Button

Community Forums Forums General Discussion How to add Random in Category Button

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  Tara123 11 months, 2 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #104618

    Tara123
    Participant

    Hi,

    I have some category pages where I show one page from a category on a page. Currently I have next and previous buttons but ideally I would like to have a button that gives a random post from that category.

    http://inspirationzoo.com/logo-design/

    As there will be a lot of different category pages if possible I would like not have to specifically specify a category in the code.

    Is this possible please.

    Thanks in advance for any help.

    http://inspirationzoo.com/logo-design
    #104628

    braddalton
    Participant

    You would need to create a new WP_Query and add a link.


    #104928

    Tara123
    Participant

    Thank you but I don’t know much php, can you advise how I could make the link random

    #105013

    braddalton
    Participant

    The code would need to be written and tested. I don’t have code to do that at the moment.


    #105090

    Tara123
    Participant

    Ok thanks anyway.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.