Programatically change a view title in Drupal

  $view = views_get_view('[VIEW_NAME]');
  $view->set_display('[DISPLAY_ID]');
  $view->display_handler->set_option('title', '[NEW_TITLE]');
  $view->save();

Tags

Comment

// Drupal 7
$view = views_get_view('[VIEW_NAME]');
$view->set_arguments($tid);
$view->set_display("[DISPLAY_ID]");
$view->pre_execute();
$view->execute();
$content = $view->render();

// Drupal 8
$args = [$tid];
$view = Views::getView('[VIEW_NAME]');
if (is_object($view)) {
$view->setArguments($args);
$view->setDisplay('[DISPLAY_ID]');
$view->preExecute();
$view->execute();
$content = $view->buildRenderable('[DISPLAY_ID]', $args);
}

Instagram Without API

Could not reach Instagram server