Hi edna-bonfim,
I have updated the Module title, and order, added the following code to the /templates/ja_smallbiz/html/mod_articles_popular/default.php file:
<?php
/**
* @package Joomla.Site
* @subpackage mod_articles_popular
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
if (!isset($list)) {
if (isset($hitsDisabledMessage)) {
echo $hitsDisabledMessage;
}
return;
}
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('a.id, a.title, a.alias, a.catid, a.created, a.hits');
$query->from('#__content AS a');
$query->join('LEFT', '#__content_frontpage AS fp ON fp.content_id = a.id');
$query->where('a.state = 1');
$query->where('fp.content_id IS NULL');
$query->where('a.access IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')');
$query->order('a.created DESC, a.hits DESC');
$query->setLimit($params->get('count'));
$db->setQuery($query);
$articles = $db->loadObjectList();
if (empty($articles)) {
return;
}
// Display module title
if ($module->showtitle) : ?>
<h3 class="module-title hide-on-sidebar"><?php echo $module->title; ?></h3>
<?php endif; ?>
<ul class="mostread mod-list">
<?php foreach ($articles as $article) : ?>
<li itemscope itemtype="https://schema.org/Article">
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($article->id, $article->catid, $article->language)); ?>" itemprop="url">
<span itemprop="name"><?php echo $article->title; ?></span>
</a>
</li>
<?php endforeach; ?>
</ul>
Also, this module shows the articles that have the most read, If you want to show the latest article, you can use the article - latest module.