Osclass Support Forums
Osclass plugin support => Blog and News Plugin => Topic started by: Tech News Tech News on September 18, 2018, 11:08:45 AM
-
Hi Dear!
I want to get 5 or 10 articles from every blog categories
to display in blog home page like
- get latest article 5 articles (all categories)
- get 10 articles in categories car, motor,phone
base on this question we already have widget code in admin to display anywhere but don't know how to get articles from every categories.
Regard
-
We do not plan to deploy such feature.
-
i just i want to know or get categories id in this code
<?php
if(!isset($type) || $type == '') {
$type = 'blg-tp-' . (blg_param('widget_type') <> '' ? blg_param('widget_type') : 'list');
} else {
$type = 'blg-tp-' . $type;
}
$blogs = ModelBLG::newInstance()->getWidgetBlogs($type);
?>