Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #195588

    Hi,

    I couldn’t figure out a way to randomise portfolio items independent of category or post date. I’m using a Re-Order plugin, but as the name calls, it just enables re ordering not randomising. If anyone has an experience on such issue, I’ll really appreciate.

    Thanks,

    #195608
    #198512

    Hello Yigit,

    Thanks for your reply, it took a quite time for me to check all those plugins and try which one works. Unfortunately I couldn’t get the random portfolio items in the end. I’m using the post-types-order plugin now to order items manually.

    only sort-query-posts plugin seems like supporting rand. function but I couldn’t figured out where to put;
    <?php sort_query_posts_by(‘rand’); ?> like in. as it says in the plugin’s read me file. Do you have any suggestions?

    Thanks for your help.

    #198565

    Hi!

    Edit template-portfolio.php, find this code on line 16:

    $avia_config['new_query'] = array("paged" => get_query_var( 'paged' ), "posts_per_page" => $avia_config['portfolio_item_count'], "post_type"=>"portfolio");

    Replace it with:

    $avia_config['new_query'] = array("paged" => get_query_var( 'paged' ), "posts_per_page" => $avia_config['portfolio_item_count'], "post_type"=>"portfolio", "orderby" => "rand");

    Reload your portfolio page a few times.

    Regards,
    Ismael

    #198609

    Hi Ismael,

    Thanks for quick reply. I’ve replaced the code you’ve sent. but nothing seems to change. My portfolio is my main page, shall I add the same code to somewhere else to make it work? What do you suggest?

    my website is;
    http://www.bookserf.com

    thanks

    #198748

    Hi,

    Open /includes/helper-templates.php and look for line 579:
    $avia_config['new_query'] = array("paged" => get_query_var( 'paged' ), "posts_per_page" => $avia_config['portfolio_item_count'], "post_type"=>"portfolio");

    Replace it by this:
    $avia_config['new_query'] = array("paged" => get_query_var( 'paged' ), "posts_per_page" => $avia_config['portfolio_item_count'], "post_type"=>"portfolio", "orderby" => "rand");

    Regards,
    Josue

    #201279

    It all seems logical but still doesn’t working. I don’t know the reason.

    I cleared the cookies as well but didn’t help. This is the website; http://bookserf.com/

    Regards,
    Erbil

    #201853

    Hi,

    Can you create an administrator account and post it here as a private reply?

    Regards,
    Josue

    #202089
    This reply has been marked as private.
    #202189

    Done: http://bookserf.com/

    Best regards,
    Josue

    #202190
    This reply has been marked as private.
    #202194

    You are welcome, glad we could help :)

    Regards,
    Josue

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

The topic ‘Randomise portfolio items’ is closed to new replies.