'; dynamic_sidebar( 'portage_before_header' ); echo ''; } } endif; 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' ) ) { echo '
'; dynamic_sidebar( 'portage_after_top_menu' ); echo '
'; } } endif; 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' ) ) { echo '
'; dynamic_sidebar( 'portage_before_social_media' ); echo '
'; } } endif; 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' ) ) { echo '
'; dynamic_sidebar( 'portage_before_primary_menu' ); echo '
'; } } endif; 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' ) ) { echo '
'; dynamic_sidebar( 'portage_after_header' ); echo '
'; } } endif; // index.php action hooks 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' ) ) { echo '
'; dynamic_sidebar( 'portage_container_top' ); echo '
'; } } endif; // content.php action hooks 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' ) ) { echo '
'; dynamic_sidebar( 'portage_before_post_title' ); echo '
'; } } endif; 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' ) ) { echo '
'; dynamic_sidebar( 'portage_before_post_content' ); echo '
'; } } endif; 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' ) ) { echo '
'; dynamic_sidebar( 'portage_post_top' ); echo '
'; } } endif; 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' ) ) { echo '
'; dynamic_sidebar( 'portage_post_bottom' ); echo '
'; } } endif; 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' ) ) { echo '
'; dynamic_sidebar( 'portage_after_post_content' ); echo '
'; } } endif; 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' ) ) { echo '
'; dynamic_sidebar( 'portage_before_post_meta' ); echo '
'; } } endif; 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' ) ) { echo '
'; dynamic_sidebar( 'portage_after_post_meta' ); echo '
'; } } endif; // comments.php action hooks 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' ) ) { echo '
'; dynamic_sidebar( 'portage_before_comments' ); echo '
'; } } endif; 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' ) ) { echo '
'; dynamic_sidebar( 'portage_after_comments' ); echo '
'; } } endif; 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(){ if ( comments_open() ) : { if ( is_active_sidebar( 'portage_before_comment_form' ) ) { echo '
'; dynamic_sidebar( 'portage_before_comment_form' ); echo '
'; } } endif; } endif; 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(){ if (comments_open() ) : { if ( is_active_sidebar( 'portage_after_comment_form' ) ) { echo '
'; dynamic_sidebar( 'portage_after_comment_form' ); echo '
'; } } endif; } endif; // footer.php action hooks 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' ) ) { echo '
'; dynamic_sidebar( 'portage_container_bottom' ); echo '
'; } } endif; 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' ) ) { echo ''; } } endif; 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' ) ) { echo ''; } } endif; 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' ) ) { echo ''; } } endif; 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' ) ) { echo ''; } } endif; // Register our action hooks as widget areas // codex.wordpress.org/Widgetizing_Themes function greybox_action_hook_widgets() { // Header widgets if ( get_theme_mod( 'portage_before_header') == '1' ) : register_sidebar( array( 'name' => 'Before Header', 'id' => 'portage_before_header', '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' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_after_top_menu') == '1' ) : register_sidebar( array( 'name' => 'After Top Menu', 'id' => 'portage_after_top_menu', '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' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_before_social_media') == '1' ) : register_sidebar( array( 'name' => 'Before Social Media', 'id' => 'portage_before_social_media', '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' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_before_primary_menu') == '1' ) : register_sidebar( array( 'name' => 'Before Primary Menu', 'id' => 'portage_before_primary_menu', 'description' => __( 'Widgets in this area will be shown on all posts and pages above the primary menu.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_after_header') == '1' ) : register_sidebar( array( 'name' => 'After Header', 'id' => 'portage_after_header', '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' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; // Index widgets if ( get_theme_mod( 'portage_container_top') == '1' ) : register_sidebar( array( 'name' => 'Top of Container', 'id' => 'portage_container_top', 'description' => __( 'Widgets in this area will be shown on all posts and pages above the sidebar and content.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; // Content widgets if ( get_theme_mod( 'portage_before_post_title') == '1' ) : register_sidebar( array( 'name' => 'Before Post Title', 'id' => 'portage_before_post_title', 'description' => __( 'Widgets in this area will be shown on all posts and pages before the post title.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_before_post_content') == '1' ) : register_sidebar( array( 'name' => 'Before Post Content', 'id' => 'portage_before_post_content', 'description' => __( 'Widgets in this area will be shown on all posts and pages after the title and before the post content.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_post_top') == '1' ) : register_sidebar( array( 'name' => 'Top of Post', 'id' => 'portage_post_top', 'description' => __( 'Widgets in this area will be shown on all posts and pages at the top of the post.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_post_bottom') == '1' ) : register_sidebar( array( 'name' => 'Bottom of Post', 'id' => 'portage_post_bottom', 'description' => __( 'Widgets in this area will be shown on all posts and pages at the bottom of the post.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_after_post_content') == '1' ) : register_sidebar( array( 'name' => 'After Post Content', 'id' => 'portage_after_post_content', 'description' => __( 'Widgets in this area will be shown on all posts and pages after the post content.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_before_post_meta') == '1' ) : register_sidebar( array( 'name' => 'Before Post Meta', 'id' => 'portage_before_post_meta', 'description' => __( 'Widgets in this area will be shown on all posts and pages before the post meta.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_after_post_meta') == '1' ) : register_sidebar( array( 'name' => 'After Post Meta', 'id' => 'portage_after_post_meta', 'description' => __( 'Widgets in this area will be shown on all posts and pages after the post meta.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; // Comments widgets if ( get_theme_mod( 'portage_before_comments') == '1' ) : register_sidebar( array( 'name' => 'Before Comments', 'id' => 'portage_before_comments', 'description' => __( 'Widgets in this area will be shown on all posts and pages before the comments.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_after_comments') == '1' ) : register_sidebar( array( 'name' => 'After Comments', 'id' => 'portage_after_comments', 'description' => __( 'Widgets in this area will be shown on all posts and pages after the comments.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_before_comment_form') == '1' ) : register_sidebar( array( 'name' => 'Before Comment Form', 'id' => 'portage_before_comment_form', 'description' => __( 'Widgets in this area will be shown on all posts and pages before the comment form.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_after_comment_form') == '1' ) : register_sidebar( array( 'name' => 'After Comment Form', 'id' => 'portage_after_comment_form', 'description' => __( 'Widgets in this area will be shown on all posts and pages after the comment form.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; // Footer widgets if ( get_theme_mod( 'portage_container_bottom') == '1' ) : register_sidebar( array( 'name' => 'Bottom of Container', 'id' => 'portage_container_bottom', 'description' => __( 'Widgets in this area will be shown on all posts and pages before the footer.', 'portage' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_before_footer_menu') == '1' ) : register_sidebar( array( 'name' => 'Before Footer Menu', 'id' => 'portage_before_footer_menu', 'description' => __( 'Widgets in this area will be shown on all posts and pages before the footer menu.', 'portage' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_footer_top') == '1' ) : register_sidebar( array( 'name' => 'Footer Top', 'id' => 'portage_footer_top', 'description' => __( 'Widgets in this area will be shown on all posts and pages at the top of the footer.', 'portage' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_footer_bottom') == '1' ) : register_sidebar( array( 'name' => 'Footer Bottom', 'id' => 'portage_footer_bottom', 'description' => __( 'Widgets in this area will be shown on all posts and pages at the bottom of the footer.', 'portage' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); endif; if ( get_theme_mod( 'portage_after_footer') == '1' ) : register_sidebar( array( 'name' => 'After Footer', 'id' => 'portage_after_footer', 'description' => __( 'Widgets in this area will be shown on all posts and pages after the footer.', 'portage' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); endif; } // end function add_action( 'widgets_init', 'greybox_action_hook_widgets' );