portage/functions/widget-areas.php

545 lines
19 KiB
PHP
Raw Normal View History

2021-08-01 17:32:46 +00:00
<?php
// Our action hook widget areas -- only display them if active
// header.php action hooks
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_header') == '1' ) :
add_action('portage_before_header', 'portage_before_header_fc' );
function portage_before_header_fc(){
if ( is_active_sidebar( 'portage_before_header' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_before_header" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_before_header' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_top_menu') == '1' ) :
add_action('portage_after_top_menu', 'portage_after_top_menu_FC' );
function portage_after_top_menu_FC(){
if ( is_active_sidebar( 'portage_after_top_menu' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_after_top_menu" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_after_top_menu' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_social_media') == '1' ) :
add_action('portage_before_social_media', 'portage_before_social_media_fc' );
function portage_before_social_media_fc(){
if ( is_active_sidebar( 'portage_before_social_media' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_before_social_media" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_before_social_media' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_primary_menu') == '1' ) :
add_action('portage_before_primary_menu', 'portage_before_primary_menu_fc' );
function portage_before_primary_menu_fc(){
if ( is_active_sidebar( 'portage_before_primary_menu' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_before_primary_menu" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_before_primary_menu' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_header') == '1' ) :
add_action('portage_after_header', 'portage_after_header_fc' );
function portage_after_header_fc(){
if ( is_active_sidebar( 'portage_after_header' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_after_header" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_after_header' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
// index.php action hooks
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_container_top') == '1' ) :
add_action('portage_container_top', 'portage_container_top_fc' );
function portage_container_top_fc(){
if ( is_active_sidebar( 'portage_container_top' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_container_top" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_container_top' );
2021-08-01 17:32:46 +00:00
echo '</div><div class="clear"></div>';
}
}
endif;
// content.php action hooks
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_post_title') == '1' ) :
add_action('portage_before_post_title', 'portage_before_post_title_fc' );
function portage_before_post_title_fc(){
if ( is_active_sidebar( 'portage_before_post_title' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_before_post_title" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_before_post_title' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_post_content') == '1' ) :
add_action('portage_before_post_content', 'portage_before_post_content_fc' );
function portage_before_post_content_fc(){
if ( is_active_sidebar( 'portage_before_post_content' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_before_post_content" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_before_post_content' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_post_top') == '1' ) :
add_action('portage_post_top', 'portage_post_top_fc' );
function portage_post_top_fc(){
if ( is_active_sidebar( 'portage_post_top' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_post_top" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_post_top' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_post_bottom') == '1' ) :
add_action('portage_post_bottom', 'portage_post_bottom_fc' );
function portage_post_bottom_fc(){
if ( is_active_sidebar( 'portage_post_bottom' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_post_bottom" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_post_bottom' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_post_content') == '1' ) :
add_action('portage_after_post_content', 'portage_after_post_content_fc' );
function portage_after_post_content_fc(){
if ( is_active_sidebar( 'portage_after_post_content' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_after_post_content" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_after_post_content' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_post_meta') == '1' ) :
add_action('portage_before_post_meta', 'portage_before_post_meta_fc' );
function portage_before_post_meta_fc(){
if ( is_active_sidebar( 'portage_before_post_meta' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_before_post_meta" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_before_post_meta' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_post_meta') == '1' ) :
add_action('portage_after_post_meta', 'portage_after_post_meta_fc' );
function portage_after_post_meta_fc(){
if ( is_active_sidebar( 'portage_after_post_meta' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_after_post_meta" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_after_post_meta' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
// comments.php action hooks
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_comments') == '1' ) :
add_action('portage_before_comments', 'portage_before_comments_fc' );
function portage_before_comments_fc(){
if ( is_active_sidebar( 'portage_before_comments' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_before_comments" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_before_comments' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_comments') == '1' ) :
add_action('portage_after_comments', 'portage_after_comments_fc' );
function portage_after_comments_fc(){
if ( is_active_sidebar( 'portage_after_comments' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_after_comments" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_after_comments' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_comment_form') == '1' ) :
add_action('portage_before_comment_form', 'portage_before_comment_form_fc' );
function portage_before_comment_form_fc(){
2021-08-01 17:32:46 +00:00
if ( comments_open() ) : {
2021-08-01 17:45:36 +00:00
if ( is_active_sidebar( 'portage_before_comment_form' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_before_comment_form" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_before_comment_form' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_comment_form') == '1' ) :
add_action('portage_after_comment_form', 'portage_after_comment_form_fc' );
function portage_after_comment_form_fc(){
2021-08-01 17:32:46 +00:00
if (comments_open() ) : {
2021-08-01 17:45:36 +00:00
if ( is_active_sidebar( 'portage_after_comment_form' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_after_comment_form" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_after_comment_form' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
}
endif;
// footer.php action hooks
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_container_bottom') == '1' ) :
add_action('portage_container_bottom', 'portage_container_bottom_fc' );
function portage_container_bottom_fc(){
if ( is_active_sidebar( 'portage_container_bottom' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div class="clear"></div><div id="portage_container_bottom" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_container_bottom' );
2021-08-01 17:32:46 +00:00
echo '</div><div class="clear"></div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_footer_menu') == '1' ) :
add_action('portage_before_footer_menu', 'portage_before_footer_menu_fc' );
function portage_before_footer_menu_fc(){
if ( is_active_sidebar( 'portage_before_footer_menu' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_before_footer_menu" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_before_footer_menu' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_footer_top') == '1' ) :
add_action('portage_footer_top', 'portage_footer_top_fc' );
function portage_footer_top_fc(){
if ( is_active_sidebar( 'portage_footer_top' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_footer_top" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_footer_top' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_footer_bottom') == '1' ) :
add_action('portage_footer_bottom', 'portage_footer_bottom_fc' );
function portage_footer_bottom_fc(){
if ( is_active_sidebar( 'portage_footer_bottom' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_footer_bottom" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_footer_bottom' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_footer') == '1' ) :
add_action('portage_after_footer', 'portage_after_footer_fc' );
function portage_after_footer_fc(){
if ( is_active_sidebar( 'portage_after_footer' ) ) {
2021-08-01 20:13:48 +00:00
echo '<div id="portage_after_footer" class="portage-action-hook">';
2021-08-01 17:45:36 +00:00
dynamic_sidebar( 'portage_after_footer' );
2021-08-01 17:32:46 +00:00
echo '</div>';
}
}
endif;
// Register our action hooks as widget areas
// codex.wordpress.org/Widgetizing_Themes
function greybox_action_hook_widgets() {
// Header widgets
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_header') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Before Header',
2021-08-01 17:45:36 +00:00
'id' => 'portage_before_header',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages just above the header and the "above header menu" (if you are using one).', 'portage' ),
'before_widget' => '<div class="portage-before-header-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_top_menu') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'After Top Menu',
2021-08-01 17:45:36 +00:00
'id' => 'portage_after_top_menu',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages below the top menu and above the site name.', 'portage' ),
'before_widget' => '<div class="portage-after-top-menu-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_social_media') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Before Social Media',
2021-08-01 17:45:36 +00:00
'id' => 'portage_before_social_media',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages to the left of the title and to the right of the social media menu.', 'portage' ),
'before_widget' => '<div class="portage-before-social-media-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_primary_menu') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Before Primary Menu',
2021-08-01 17:45:36 +00:00
'id' => 'portage_before_primary_menu',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages above the primary menu.', 'portage' ),
'before_widget' => '<div class="portage-before-primary-menu-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_header') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'After Header',
2021-08-01 17:45:36 +00:00
'id' => 'portage_after_header',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages after the header and before the main content and sidebar.', 'portage' ),
'before_widget' => '<div class="portage-after-header-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
// Index widgets
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_container_top') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Top of Container',
2021-08-01 17:45:36 +00:00
'id' => 'portage_container_top',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages above the sidebar and content.', 'portage' ),
'before_widget' => '<div class="portage-container-top-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
// Content widgets
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_post_title') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Before Post Title',
2021-08-01 17:45:36 +00:00
'id' => 'portage_before_post_title',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages before the post title.', 'portage' ),
'before_widget' => '<div class="portage-before-post-title-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_post_content') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Before Post Content',
2021-08-01 17:45:36 +00:00
'id' => 'portage_before_post_content',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages after the title and before the post content.', 'portage' ),
'before_widget' => '<div class="portage-before-post-content-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_post_top') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Top of Post',
2021-08-01 17:45:36 +00:00
'id' => 'portage_post_top',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages at the top of the post.', 'portage' ),
'before_widget' => '<div class="portage-post-top-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_post_bottom') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Bottom of Post',
2021-08-01 17:45:36 +00:00
'id' => 'portage_post_bottom',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages at the bottom of the post.', 'portage' ),
'before_widget' => '<div class="portage-post-bottom-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_post_content') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'After Post Content',
2021-08-01 17:45:36 +00:00
'id' => 'portage_after_post_content',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages after the post content.', 'portage' ),
'before_widget' => '<div class="portage-after-post-content-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_post_meta') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Before Post Meta',
2021-08-01 17:45:36 +00:00
'id' => 'portage_before_post_meta',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages before the post meta.', 'portage' ),
'before_widget' => '<div class="portage-before-post-meta-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_post_meta') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'After Post Meta',
2021-08-01 17:45:36 +00:00
'id' => 'portage_after_post_meta',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages after the post meta.', 'portage' ),
'before_widget' => '<div class="portage-after-post-meta-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
// Comments widgets
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_comments') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Before Comments',
2021-08-01 17:45:36 +00:00
'id' => 'portage_before_comments',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages before the comments.', 'portage' ),
'before_widget' => '<div class="portage-before-comments-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_comments') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'After Comments',
2021-08-01 17:45:36 +00:00
'id' => 'portage_after_comments',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages after the comments.', 'portage' ),
'before_widget' => '<div class="portage-after-comments-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_comment_form') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Before Comment Form',
2021-08-01 17:45:36 +00:00
'id' => 'portage_before_comment_form',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages before the comment form.', 'portage' ),
'before_widget' => '<div class="portage-before-comment-form-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_comment_form') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'After Comment Form',
2021-08-01 17:45:36 +00:00
'id' => 'portage_after_comment_form',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages after the comment form.', 'portage' ),
'before_widget' => '<div class="portage-after-comment-form-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
// Footer widgets
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_container_bottom') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Bottom of Container',
2021-08-01 17:45:36 +00:00
'id' => 'portage_container_bottom',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages before the footer.', 'portage' ),
'before_widget' => '<div class="portage-container-bottom-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_before_footer_menu') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Before Footer Menu',
2021-08-01 17:45:36 +00:00
'id' => 'portage_before_footer_menu',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages before the footer menu.', 'portage' ),
'before_widget' => '<div class="portage-before-footer-menu-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_footer_top') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Footer Top',
2021-08-01 17:45:36 +00:00
'id' => 'portage_footer_top',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages at the top of the footer.', 'portage' ),
'before_widget' => '<div class="portage-footer-top-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_footer_bottom') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'Footer Bottom',
2021-08-01 17:45:36 +00:00
'id' => 'portage_footer_bottom',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages at the bottom of the footer.', 'portage' ),
'before_widget' => '<div class="portage-footer-bottom-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
2021-08-01 17:45:36 +00:00
if ( get_theme_mod( 'portage_after_footer') == '1' ) :
2021-08-01 17:32:46 +00:00
register_sidebar( array(
'name' => 'After Footer',
2021-08-01 17:45:36 +00:00
'id' => 'portage_after_footer',
2021-08-01 20:13:48 +00:00
'description' => __( 'Widgets in this area will be shown on all posts and pages after the footer.', 'portage' ),
'before_widget' => '<div class="portage-after-footer-widget">',
2021-08-01 17:32:46 +00:00
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
) );
endif;
} // end function
add_action( 'widgets_init', 'greybox_action_hook_widgets' );