• Resolved nadbamas

    (@nadbamas)


    Hello,

    Your motive is the best I have worked with so far. Thank you.

    However, I would like to modify it slightly.
    By default, posts are displayed by date. So I would like the carousel to be something like a reminder of older posts. Is it possible for the carousel to display a random first post from certain categories? The next ones would be displayed chronologically, but the first would be a kind of archive reminder.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can edit the carousel settings in the theme folder, lucienne\template-parts\carousel.php. Line 10 is the line to tinker with (in version 0.0.6).

    $new_query = new WP_Query( array( 'cat' => $carousel_cat , 'showposts' => $carousel_count ));

    You can edit it like this to randomize the posts that are selected from that category:

    $new_query = new WP_Query( array( 'cat' => $carousel_cat , 'showposts' => $carousel_count , 'orderby' => 'rand' ));

    Thread Starter nadbamas

    (@nadbamas)

    Thank you ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Random post on carousel’ is closed to new replies.