$entry){$entry['key']=$key;$cat=strtolower(trim($entry['category']??''));if($cat)$categories[$cat]=($categories[$cat]??0)+1;$coll=(string)($entry['collection']??'');if($coll)$collections[$coll][]=$entry;foreach($entry['tags']??array() as $tag){$tag=strtolower(trim($tag));if($tag)$tags[$tag]=($tags[$tag]??0)+1;}$entries[]=$entry;} ksort($categories);ksort($tags);uksort($collections,function($a,$b)use($names){return strnatcasecmp($names[$a]??$a,$names[$b]??$b);}); $read=static function($key){return isset($_GET[$key])&&is_string($_GET[$key])?sanitize_text_field(wp_unslash($_GET[$key])):'';}; $search=$read('s');$category=strtolower($read('category'));$collection=$read('collection');$plan=$read('plan');$view=$read('view')==='collections'?'collections':'templates';$chosen=array();foreach((array)($_GET['tags']??array()) as $tag)if(is_string($tag))$chosen[]=strtolower(sanitize_text_field(wp_unslash($tag))); $filtered=bkbg_catalog_filter_entries($entries,$search,$category,$collection,$plan,$chosen); $groups=array_filter($collections,function($rows,$id)use($view,$search,$names){return $view!=='collections'||$search===''||stripos(($names[$id]??'').' '.implode(' ',array_column($rows,'title')),$search)!==false;},ARRAY_FILTER_USE_BOTH); $total=$view==='collections'?count($groups):count($filtered);$per=$view==='collections'?8:24;$pages=max(1,(int)ceil($total/$per));$current=min($pages,max(1,(int)$read('paged')));$visible=$view==='collections'?array_slice($groups,($current-1)*$per,$per,true):array_slice($filtered,($current-1)*$per,$per); $base=admin_url('admin.php');$home=add_query_arg('page','blockenberg-templates',$base);$args=array('page'=>'blockenberg-templates','view'=>$view,'s'=>$search,'category'=>$category,'collection'=>$collection,'plan'=>$plan,'tags'=>$chosen); ?>
Blockenberg

Template Library

Page of
$rows):$link=add_query_arg(array('collection'=>$id),$home);?>
$e):$ready=($e['status']??'')==='ready';$locked=($e['plan']??'')!=='free'&&!bkbg_library_pro_enabled();$preview=bkbg_catalog_preview_url($e);?>

No matches yet

Try another search or clear your filters.

Reset filters
1):?>

Template preview

Scroll inside the preview. Press Escape or Close to return to the library.