__( 'Primary Menu', 'tribbiani' ) ) ); /** * Setup the WordPress core custom background feature. */ add_theme_support( 'custom-background', apply_filters( 'tribbiani_custom_background_args', array( 'default-color' => '000000', 'default-image' => '', ) ) ); } endif; // tribbiani_setup add_action( 'after_setup_theme', 'tribbiani_setup' ); /** * Register widgetized area and update sidebar with default widgets */ function tribbiani_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'tribbiani' ), 'id' => 'sidebar-aside', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer', 'tribbiani' ), 'id' => 'sidebar-footer', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'tribbiani_widgets_init' ); if ( !function_exists( 'optionsframework_init' ) ) { define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/inc/' ); require_once dirname( __FILE__ ) . '/inc/options-framework.php'; } add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts'); function optionsframework_custom_scripts() { ?> "; echo bloginfo( 'name' ); echo ""; if (is_category() || is_single()) { echo " > "; $cats = get_the_category( $post->ID ); foreach ( $cats as $cat ){ echo $cat->cat_name; echo " > "; } if (is_single()) { the_title(); } } elseif (is_page()) { if($post->post_parent){ $anc = get_post_ancestors( $post->ID ); $anc_link = get_page_link( $post->post_parent ); foreach ( $anc as $ancestor ) { $output = " > ".get_the_title($ancestor)." > "; } echo $output; the_title(); } else { echo ' > '; echo the_title(); } } } elseif (is_tag()) {single_tag_title();} elseif (is_day()) {echo"Archive: "; the_time('F jS, Y'); echo'';} elseif (is_month()) {echo"Archive: "; the_time('F, Y'); echo'';} elseif (is_year()) {echo"Archive: "; the_time('Y'); echo'';} elseif (is_author()) {echo"Author's archive: "; echo'';} elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {echo "Blogarchive: "; echo'';} elseif (is_search()) {echo"Search results: "; } } /** * Implement the Custom Header feature. */ function tribbiani_pagination() { global $wp_query; $big = 12345678; $page_format = paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages, 'type' => 'array' ) ); if( is_array($page_format) ) { $paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged'); echo '
'; } } function newp_custom_head_codes() { if ( (function_exists( 'of_get_option' )) && (of_get_option('headcode1', true) != 1) ) { echo of_get_option('headcode1', true); } if ( (function_exists( 'of_get_option' )) && (of_get_option('style2', true) != 1) ) { echo ""; } } add_action('wp_head', 'newp_custom_head_codes'); /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php';