diff --git a/template.php b/template.php
index e7c913a..6a5984e 100644
--- a/template.php
+++ b/template.php
@@ -611,13 +611,13 @@ function zen_menu_local_tasks(&$variables) {
     $variables['primary']['#prefix'] = '<h2 class="visually-hidden">' . t('Primary tabs') . '</h2>';
     $variables['primary']['#prefix'] .= '<ul class="tabs">';
     $variables['primary']['#suffix'] = '</ul>';
-    $output .= drupal_render($variables['primary']);
+    $output .= \Drupal::service('renderer')->render($variables['primary']);
   }
   if (!empty($variables['secondary'])) {
     $variables['secondary']['#prefix'] = '<h2 class="visually-hidden">' . t('Secondary tabs') . '</h2>';
     $variables['secondary']['#prefix'] .= '<ul class="tabs--secondary">';
     $variables['secondary']['#suffix'] = '</ul>';
-    $output .= drupal_render($variables['secondary']);
+    $output .= \Drupal::service('renderer')->render($variables['secondary']);
   }
 
   return $output;
