Most popular media in pages or postes?

Is possible to integrale Most popular Media in Posts and Pages similar to the widget Funktion?

Hello @Jan,

Yes. It is possible to get most popular media in Posts and Pages with Rating [rtMedia PRO feature].
You need to write custom query to make a widget that will show popular Media in Posts and Pages.

got rtmedia pro
but how does this work?

Hello @Jan,

The following code will get the popular media list:

$rtmediaModel = new RTMediaModel();  
    $media_popular = $rtmediaModel->get( array(), false, false, $order_by = 'ratings_average desc' );  
    foreach( $media_popular as $media ){  
        ?>  
          
              
          
        <?php  
    }