Oh, this thing works:
$options = array(
'type' => 'object',
'subtype' => 'blog',
);
$content = elgg_get_entities($options);
foreach($content as $result){
echo $result->title;
echo $result->description;
}
try the following:
set_context("search");
echo elgg_list_entities(array("type" => "object", "subtype" => "blog", "owner_guid" => 0, "limit" => 5, "full_view" => FALSE, "pagination" => FALSE));
the above code will list the blogs using elgg's built in listing view. That way you don't need to define what the appearance is. It will save you some lines of code. :)
Thank you for advice. But my goal is to define custom appearance of blog posts. Trying to create community blog functionality with community posts on index.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.