'; } } add_action( 'wp_head', 'arena_pingback_header' ); if ( ! function_exists( 'arena_title' ) ) : /** * Customize header title. * * @since 1.0.0 * * @param string $title Title. * @return string Modified title. */ function arena_title( $title ) { if ( is_home() ) { $title = themeszen_get_option('arena_blogtitle'); } elseif ( is_singular() ) { $title = single_post_title( '', false ); } elseif ( is_category() || is_tag() ) { $title = single_term_title( '', false ); } elseif ( is_archive() ) { $title = strip_tags( get_the_archive_title() ); } elseif ( is_search() ) { $title = sprintf( esc_html__( 'Search Results for: %s', 'arena' ), get_search_query() ); } elseif ( is_404() ) { $title = esc_html__( '404!', 'arena' ); } return $title; } endif; add_filter( 'arena_filter_title', 'arena_title' ); /** filter function for wp_title */ function arena_filter_wp_title( $old_title, $sep, $sep_location ){ // add padding to the sep $ssep = ' ' . $sep . ' '; // find the type of index page this is if( is_category() ) $insert = $ssep . 'Category'; elseif( is_tag() ) $insert = $ssep . 'Tag'; elseif( is_author() ) $insert = $ssep . 'Author'; elseif( is_year() || is_month() || is_day() ) $insert = $ssep . 'Archives'; else $insert = NULL; // get the page number we're on (index) if( get_query_var( 'paged' ) ) $num = $ssep . 'page ' . get_query_var( 'paged' ); // get the page number we're on (multipage post) elseif( get_query_var( 'page' ) ) $num = $ssep . 'page ' . get_query_var( 'page' ); // else else $num = NULL; // concoct and return new title return $insert . $old_title . $num; } // call our custom wp_title filter, with normal (10) priority, and 3 args add_filter( 'wp_title', 'arena_filter_wp_title', 10, 3 ); if ( ! function_exists( 'arena_excerpt_length' ) ) : /** * arena Excerpt Length * * @since arena 1.0 */ function arena_excerpt_length( $length ) { return 30; } endif; add_filter( 'excerpt_length', 'arena_excerpt_length' ); function arena_auto_excerpt_more( $more ) { return ' …' ; } add_filter( 'excerpt_more', 'arena_auto_excerpt_more' ); if ( ! function_exists( 'arena_primary_navigation_fallback' ) ) : /** * Fallback for primary navigation. * * @since 1.0.0 */ function arena_primary_navigation_fallback() { echo '