Skip to content

Commit

Permalink
Merge pull request #705 from bootscore/Add-Top-Bar-widget-position
Browse files Browse the repository at this point in the history
Add top-bar widget position
  • Loading branch information
crftwrk committed Feb 26, 2024
2 parents a262849 + 41c9403 commit 65f1701
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@

<div id="page" class="site">

<!-- Top Bar Widget -->
<?php if (is_active_sidebar('top-bar')) : ?>
<?php dynamic_sidebar('top-bar'); ?>
<?php endif; ?>

<header id="masthead" class="site-header sticky-top bg-body-tertiary">

<nav id="nav-main" class="navbar navbar-expand-lg">
Expand Down
11 changes: 11 additions & 0 deletions inc/widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
if (!function_exists('bootscore_widgets_init')) :

function bootscore_widgets_init() {

// Top Bar
register_sidebar(array(
'name' => esc_html__('Top Bar', 'bootscore'),
'id' => 'top-bar',
'description' => esc_html__('Add widgets here.', 'bootscore'),
'before_widget' => '<div class="top-bar-widget">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title d-none">',
'after_title' => '</div>'
));

// Top Nav
register_sidebar(array(
Expand Down

0 comments on commit 65f1701

Please sign in to comment.