Loading views blocks that aren't actively set Is there a way to programmatically load a views block that isn't active in the config(not placed under admin->structure->block layout).

My usual method to load a block programmatically is something like the following in hook_preprocess_node:

$block = Block::load('views_block__courses_block_3');
$block_render = \Drupal::entityTypeManager()-&gt;getViewBuilder('block')-&gt;view($block);


However, that seems to just return null if I haven't placed the block into a region after creating it under views.

Also noticed that the block isn't listed in the config table until placed into a region.
See this answer for details.

Basically, the way to do this is to add a "Hidden Blocks" region to your theme, then place the blocks you want to render there.  The region does not get rendered so it's not a big resource drain.  We do this to use have "block" paragraphs using paragraphs all the time.