Forum
Welcome, Guest
Please Login to access forum.
Re:How to limit to 10 K2 articles the RSS feed (1 viewing) 
Go to bottom
TOPIC: Re:How to limit to 10 K2 articles the RSS feed
#4447
John Dagelmore
Admin
Posts: 3873
User Online Now
Re:How to limit to 10 K2 articles the RSS feed Karma: 84  
Hello, that parameter works as supposed but please take care that:

1. It refers to the number of days not the number of articles
2. It works for Joomla articles not for K2 articles

If you want to limit the number of K2 articles to the most 10 recent ones, you need to change the Raw SQL query as below:

Code:

SELECT `#__k2_items`.`title`, `#__k2_items`.`modified`, CONCAT_WS(':', `#__k2_items`.`id`, `#__k2_items`.`alias`) AS `id`, `#__k2_items`.`catid`, `#__k2_items`.`publish_up`, `#__k2_items`.`metakey`, `#__k2_categories`.`name` FROM `#__k2_items` JOIN `#__k2_categories` ON `#__k2_items`.`catid` = `#__k2_categories`.`id` WHERE `#__k2_categories`.`published` = '1' AND `#__k2_items`.`published` = '1' AND `#__k2_items`.`access` IN {aid} AND (`#__k2_items`.`language` = '*' OR `#__k2_items`.`language` = '' OR `#__k2_items`.`language` = {langtag}) AND `#__k2_items`.`trash` = '0' AND (`#__k2_items`.`publish_down` > NOW() OR `#__k2_items`.`publish_down` = '0000-00-00 00:00:00') ORDER BY `#__k2_items`.`created` DESC LIMIT 10
where at the bottom you see the custom ordering and limit
Code:

ORDER BY `#__k2_items`.`created` DESC LIMIT 10
 
Logged Logged  
  The administrator has disabled public write access.
Go to top