1. Go to this page and download the library: Download nlybe/elgg-news library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nlybe / elgg-news example snippets
echo elgg_view('elgg-news/custom_list_view', [
'entities' => $entities, // list of news entities, previously retrieved
'read_more' => true, // set true if want to add a "Read more" link for each news item
'item_class' => '', // set a custom class on news items, so it could be customized through CSS
'photo_size' => 'custom', // set the size of the news photo, see more details below
'photo_cover' => false, // set true if want to use the news as cover image, otherwise it will be displayed inline with title and intro
'photo_class' => '', // set a custom class on news photo
]);