Как в плагине Newsmatic : Posts List сделать вывод материалов в сайдбаре рандомно?

Есть плагин на сайте Newsmatic : Posts List
он выводит материалы – но с последней записи начинает. как сделать рандомно?

В файле /public_html/wp-content/themes/newsmatic/inc/widgets/posts-list.php
нужно добавить

 <?php
                    $post = new WP_Query( 
                        array( 
                            'category_name'    => esc_html( $posts_category ),
                            'posts_per_page' => absint( $posts_count ),
                            'ignore_sticky_posts'    => true,
    'orderby'            => 'rand'
                        
                        )

guest
Другие сообщения форума
Закрыть меню
ZAPLATA.RU | Магазин готовых блогов Wordpress с автонаполнением
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.