diff --git a/administrator/language/en-GB/com_content.ini b/administrator/language/en-GB/com_content.ini
index 12a57f2e70fa1..dc5e50a580ad1 100644
--- a/administrator/language/en-GB/com_content.ini
+++ b/administrator/language/en-GB/com_content.ini
@@ -97,6 +97,8 @@ COM_CONTENT_FIELD_URLS_OPTIONS="URL Options"
COM_CONTENT_FIELD_URLSPOSITION_LABEL="Positioning of the Links"
COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS="Use Article Settings"
COM_CONTENT_FIELD_VERSION_LABEL="Revision"
+COM_CONTENT_FIELD_YEAR_SORT_DESC="The order in which years will appear in the year sort dropdown. Oldest First shows years in ascending order (2011, 2012...). Most Recent First shows years in descending order (2025, 2024...)."
+COM_CONTENT_FIELD_YEAR_SORT_LABEL="Year Sort Order"
COM_CONTENT_FIELDS_ARTICLE_FIELD_ADD_TITLE="Articles: New Field"
COM_CONTENT_FIELDS_ARTICLE_FIELD_EDIT_TITLE="Articles: Edit Field"
COM_CONTENT_FIELDS_ARTICLE_FIELDS_TITLE="Articles: Fields"
diff --git a/components/com_content/src/Model/ArchiveModel.php b/components/com_content/src/Model/ArchiveModel.php
index 13e533efc6479..ad08702343ed0 100644
--- a/components/com_content/src/Model/ArchiveModel.php
+++ b/components/com_content/src/Model/ArchiveModel.php
@@ -155,11 +155,12 @@ public function getData()
*/
public function getYears()
{
- $db = $this->getDatabase();
- $nowDate = Factory::getDate()->toSql();
- $query = $db->getQuery(true);
- $queryDate = QueryHelper::getQueryDate($this->state->params->get('order_date'), $db);
- $years = $query->year($queryDate);
+ $db = $this->getDatabase();
+ $nowDate = Factory::getDate()->toSql();
+ $query = $db->getQuery(true);
+ $queryDate = QueryHelper::getQueryDate($this->state->params->get('order_date'), $db);
+ $years = $query->year($queryDate);
+ $yearSort = $this->state->params->get('year_sort_order', 'ASC');
$query->select('DISTINCT ' . $years)
->from($db->quoteName('#__content', 'a'))
@@ -182,7 +183,7 @@ public function getYears()
)
->bind(':publishUp', $nowDate)
->bind(':publishDown', $nowDate)
- ->order('1 ASC');
+ ->order('1 ' . $yearSort);
$db->setQuery($query);
diff --git a/components/com_content/tmpl/archive/default.xml b/components/com_content/tmpl/archive/default.xml
index f5bf865581002..7e0fb8ececd38 100644
--- a/components/com_content/tmpl/archive/default.xml
+++ b/components/com_content/tmpl/archive/default.xml
@@ -67,6 +67,18 @@
+
+
+
+
+