Hello zeldior,
the Widget can be added to your site via the WordPress administration interface in Appearance -> Widgets. Do you need a shortcode for it?
I Would add the June page of the Divi via text module via a shortcode
Add this code to your themes functions.php file:
add_shortcode( 'widget', 'my_widget_shortcode' );
function my_widget_shortcode( $atts ) {
// Configure defaults and extract the attributes into variables
extract( shortcode_atts(
array(
'type' => '',
'title' => '',
),
$atts
));
$args = array(
'before_widget' => '<div class="box widget">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title">',
'after_title' => '</div>',
);
ob_start();
the_widget( $type, $atts, $args );
$output = ob_get_clean();
return $output;
}
After that you can add the Asgaros Forum Recent Posts-Widget in every page/post with the following shortcode:
[widget type="AsgarosForumRecentPosts_Widget" title="My Title"]
I forgot something in the shortcode. Here is the correct example:
[widget type="AsgarosForumRecentPosts_Widget" title="My Title" number="2" target="1281"]
title: The title
number: Number of replys
target: The ID of the forum page