Render block in twig file drupal 8 I have created a block in custom block library, i need to render the block on all pages except home page.

Unfortunately I need to do it in twig file only because of ui issues if I enabled in the block layout UI

In twig file how can I render the block in drupal 8.

Thanks
Add following code in "themename.theme"


function themename_preprocess_page(&$variables) {
  $block = \Drupal\block\Entity\Block::load('block_id');
  $block_content = \Drupal::entityTypeManager()
    ->getViewBuilder('block')
    ->view($block);
 $variables['your_block_name'] = $block_content;
}


in twig template file use following variable


{{ your_block_name }}