Home Forums Theme support HOT 1.05 – Person grid in random order ?

Tagged: ,

This topic contains 13 replies, has 3 voices, and was last updated by  7Theme Support 7 years ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
  • Hello. I want person grid to be displayed in random order. How do I do this? Is there a special shorcode?

    Now I use:

    [person_grid number=”28″ columns=”4″]

    but this shorcode displays the latest persons first.

    Or php modification with ‘orderby’=> ‘rand’ in person-grid.php ?


    with the “extension” from your last post it will work, you can add it without any problem. We can include this option in the next update for the theme

    Thanks, but it does not work. I added here, is that correct?

    <?php $ix=0;
    query_posts(array( ‘orderby’ => ‘date’, ‘post_type’ => ‘person’, ‘paged’ => get_query_var(‘paged’), ‘posts_per_page’=>$post_per_page , ‘person-category’=>$group_cat ) );

    Sorry, I have added this, with rand, not date, but it does not work.

    <?php $ix=0;
    query_posts(array( ‘orderby’ => ‘rand’, ‘post_type’ => ‘person’, ‘paged’ => get_query_var(‘paged’), ‘posts_per_page’=>$post_per_page , ‘person-category’=>$group_cat ) );

    We tested it on our website and it’s working without any problem, see here:


    We made already an update for it, new version is 1.06, and you can download it in your content.

    You can add the new option like in this example

    [person_grid orderby='rand']

    Thank you very much, I will test the theme changes. Are you a team of great quality. 🙂

    You’re welcome! 🙂

    So changes have to be made in posttype-person.php, in 7league folder. I added:

    ‘orderby’ => ”,

    ‘orderby’ => $orderby,

    Everything is OK. Now displays random. Thank you !

    You’re welcome!

    Is it possible, to have a sort option at every entry ?

    So we can choose at the entry itself, which position it has.

    No, the only way you can sort the entries is to use a plugin, because WordPress there is no native way in WordPress for that. Please take a look at this plugin, it’s working with all post types:


    Thanks a lot, this works absolutely perfect and totaly in the way we wanted it.

    You’re welcome! 🙂

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

You must be logged in to reply to this topic.