diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index 5fc843b420d..9078fc2920d 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -307,11 +307,19 @@ def diff
def index
@title = I18n.t('wiki_controller.wiki')
-
- order_string = if params[:order] == 'alphabetic'
- 'node_revisions.title ASC'
- else
- 'node_revisions.timestamp DESC'
+ sort_param = params[:sort]
+ order_string = 'node_revisions.timestamp DESC'
+
+ if sort_param == 'title'
+ order_string = 'node_revisions.title ASC'
+ elsif sort_param == 'last_edited'
+ order_string = 'node_revisions.timestamp DESC'
+ elsif sort_param == 'edits'
+ order_string = 'drupal_node_revisions_count DESC'
+ elsif sort_param == 'page_views'
+ order_string = 'views DESC'
+ elsif sort_param == 'likes'
+ order_string = 'cached_likes DESC'
end
@wikis = Node.includes(:revision)
diff --git a/app/views/tag/index.html.erb b/app/views/tag/index.html.erb
index c753701506e..a21a877ca64 100644
--- a/app/views/tag/index.html.erb
+++ b/app/views/tag/index.html.erb
@@ -21,11 +21,11 @@