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

Title: get 5 articles from every categories like widget for blog home page
Post 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
Title: Re: get 5 articles from every categories like widget for blog home page
Post by: MB Themes on September 18, 2018, 06:18:40 PM
We do not plan to deploy such feature.
Title: Re: get 5 articles from every categories like widget for blog home page
Post by: Tech News Tech News on September 20, 2018, 11:50:38 AM
i just i want to know or get categories id in this code
Quote
<?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);
?>