• Resolved PierpaoloCorso

    (@pierpaolocorso)


    good Morning
    a salute to the staff and those who work for this wonderful theme .
    I would like to ask you a question : In the homepage , you can put the items in random mode ? Now under the name of the categories appear in order of time, to serve me in random mode .
    How can I do?

    thanks
    a hug

Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author Richie KS

    (@rkcorp)

    you will need to edit lib/templates/home-feat-cat.php line 55 (similiar code in each cat clock)

    $my_query1 = new WP_Query('cat='. $featcat1 . '&' . 'offset=' . '&' . 'showposts=' . $featcat1_count);

    to

    $my_query1 = new WP_Query('cat='. $featcat1 . '&' . 'offset=' . '&' . 'showposts=' . $featcat1_count . '&orderby=rand');

    add &orderby=rand at the end

    Thread Starter PierpaoloCorso

    (@pierpaolocorso)

    Thanks so much
    I tried to change the line but nothing happens, the home page remains the same. Items are always arranged in chronological order. Is there a solution?

    thanks

    Link: http://www.pierpaolocorso.com

    Theme Author Richie KS

    (@rkcorp)

    try this instead
    &orderby=rand&order=ASC
    or
    &orderby=rand&order=DESC

    Thread Starter PierpaoloCorso

    (@pierpaolocorso)

    nothing
    I made ​​the change and it worked only the first time , when I reloaded the page the items were the same.
    I need that for each visit received, the items are arranged in random mode .
    To have the same effect on all classes as I should proceed?
    I’m sorry for the inconvenience but this would be a very important feature for me.

    a hug from italy
    Pierpaolo

    Theme Author Richie KS

    (@rkcorp)

    well its working for me, the actual edited code would be like

    $my_query1 = new WP_Query('cat='. $featcat1 . '&' . 'offset=' . '&' . 'showposts=' . $featcat1_count. '&orderby=rand&order=DESC');

    make sure cache were cleared.

    Thread Starter PierpaoloCorso

    (@pierpaolocorso)

    ok. The code on the line 55 is :

    $my_query1 = new WP_Query(‘cat=’. $featcat1 . ‘&’ . ‘offset=’ . ‘&’ . ‘showposts=’ . $featcat1_count. ‘&orderby=rand&order=DESC’); ?>

    but it does not work . I tried it with firefox and chrome , after cleaning every time, but it does not work

    you can try going on http://www.pierpaolocorso.com

    The edited file is still online

    a hug

    Thread Starter PierpaoloCorso

    (@pierpaolocorso)

    it works 🙂

    i’m very very very very very happy

    thankkkkkkksss

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

The topic ‘Article random mode in homepage’ is closed to new replies.