PRIMARY_WIDGET, 'id' => 'primary-widget-area', 'description' => PRIMARY_WIDGET, 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); //Area 2, located below the Primary Widget Area in the sidebar. Empty by default. register_sidebar( array( 'name' => SECONDRY_WIDGET, 'id' => 'secondary-widget-area', 'description' => SECONDRY_WIDGET, 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); //Area 3, located in the footer. Empty by default. register_sidebar( array( 'name' => FIRST_FOOTER_WIDGET, 'id' => 'first-footer-widget-area', 'description' => FIRST_FOOTER_WIDGET, 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); //Area 4, located in the footer. Empty by default. register_sidebar( array( 'name' => SECONDRY_FOOTER_WIDGET, 'id' => 'second-footer-widget-area', 'description' => SECONDRY_FOOTER_WIDGET, 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); //Area 5, located in the footer. Empty by default. register_sidebar( array( 'name' => THIRD_FOOTER_WIDGET, 'id' => 'third-footer-widget-area', 'description' => THIRD_FOOTER_WIDGET, 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); //Area 6, located in the footer. Empty by default. register_sidebar( array( 'name' => FOURTH_FOOTER_WIDGET, 'id' => 'fourth-footer-widget-area', 'description' => FOURTH_FOOTER_WIDGET, 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } /** Register sidebars by running BeCrux_widgets_init() on the widgets_init hook. */ add_action( 'widgets_init', 'BeCrux_widgets_init' ); /* ----------------------------------------------------------------------------------- */ /* Menu Registration */ /* ----------------------------------------------------------------------------------- */ add_action( 'after_setup_theme', 'BeCrux_register_my_menu' ); function BeCrux_register_my_menu() { register_nav_menus( array( 'header_menu' => HOME_MENU, 'frontpage-menu' => FRONT_MENU, 'footer-menu' => FOOTER_MENU ) ); } /* ----------------------------------------------------------------------------------- */ /* Page Navigation */ /* ----------------------------------------------------------------------------------- */ if ( !function_exists( 'BeCrux_content_nav' ) ) : function BeCrux_content_nav( $html_id ) { global $wp_query; $html_id = esc_attr( $html_id ); if ( $wp_query->max_num_pages > 1 ) : ?>

'; if ( !is_home() ) { echo ''; esc_html( bloginfo( 'name' ) ); echo " | "; if ( is_category() || is_single() ) { if ( is_category() ) { //the_category('|'); single_cat_title( '', true ); } elseif ( is_single() ) { the_title(); } } elseif ( is_page() ) { echo the_title(); } } echo ''; } /* ----------------------------------------------------------------------------------- */ /* Pagination for single post */ /* ----------------------------------------------------------------------------------- */ function BeCrux_numeric_posts_nav() { if ( is_singular() ) return; global $wp_query; /** Stop execution if there's only 1 page */ if ( $wp_query->max_num_pages <= 1 ) return; $paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1; $max = intval( $wp_query->max_num_pages ); /** Add current page to the array */ if ( $paged >= 1 ) $links[] = $paged; /** Add the pages around the current page to the array */ if ( $paged >= 3 ) { $links[] = $paged - 1; $links[] = $paged - 2; } if ( ( $paged + 2 ) <= $max ) { $links[] = $paged + 2; $links[] = $paged + 1; } echo '' . "\n"; } /* --------------------------------------------------------------------- */ /* * ***Add CLASS attributes to the first