Random posts for Homepage Panes

  • tamale

    #9885

    I want the Homepage panes on from front page to display random posts. I have been able to do this by editing theme-panes.php and changing the quesry to ‘orderby’ => ‘rand’ instead of date.

    How can I include this in my functions.php instead, so it doesn’t get overwritten on a theme update?

    Thanks

    tamale

    #44815

    I think I’ve found the answer

    I added this to my child theme functions.php file

    function change_order($fields) {
    $fields['orderby'] = __('rand');
    return $fields;
    }
    add_filter('graphene_homepage_panes_args','change_order');

    Mabul

    #44816

    Hi, how can i make the child page order that appears below parent page random?

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

You must be logged in to reply to this topic.