I want to display widget content into non-widget view file.
but that procedure i don't know.
pls. help me, get me some extension or information about that.
in Elgg.
will get code from liked_content Plugin file is elgg.2.2.1\mod\liked_content\views\default\widgets\liked_content\content.php
and
paste this code in to
elgg.2.2.1\mod\profile\views\default\profile\owner_block.php
Some, Changes I have Do... Now
$widget = $vars['entity'];
$container = $widget->getContainerEntity(); // problem here
$options =eligo_get_display_entities_options($widget); // and, problem is here
$options['annotation_names'] = array('likes');
if (elgg_instanceof($container, 'user') && $widget->my_likes !== 0) {
$options['annotation_owner_guids'] = $container->guid;
}
if (!elgg_instanceof($container, 'user') && !elgg_instanceof($container, 'group')) {
unset($options['container_guids']);
}
if ($widget->eligo_sortby == 'mostliked') {
$dbprefix = elgg_get_config('dbprefix');
$likes_metastring = get_metastring_id('likes');
$options['selects'] = array("(SELECT count(distinct l.id) FROM {$dbprefix}annotations l WHERE l.name_id = $likes_metastring AND l.entity_guid = e.guid) AS likes");
$options['order_by'] = 'likes ASC';
if ($widget->eligo_sortby_dir == 'desc') {
$options['order_by'] = 'likes DESC';
}
}
$content = elgg_list_entities_from_annotations($options);
Yes, you can display it anywhere you would like with the help of function dynamic_sidebar() (i.e. https://codex.wordpress.org/Function_Reference/dynamic_sidebar)