%s', esc_html( get_the_title() ) ); } elseif ( is_attachment() ) { printf( '' . __( 'Blog Post Image: ', 'alante' ) . '' . '%s', esc_html( get_the_title( $post->post_parent ) ) ); } else if ( is_single() ) { printf( '%s', html_entity_decode( esc_html( get_the_title() ) ) ); } else if ( is_search() ) { printf( '' . __( 'Search Results: ', 'alante' ) . '' . '%s', esc_html( get_search_query() ) ); } else if ( is_404() ) { printf( '' . __( 'Page Not Found', 'alante' ) . '' ); } elseif ( is_archive() ) { printf( get_the_archive_title() ); } elseif ( is_tax() ) { printf( get_queried_object()->name ); } elseif ( alante_thinkup_check_isblog() ) { printf( '' . __( 'Blog', 'alante' ) . '' ); } else { printf( '%s', html_entity_decode( esc_html( get_the_title() ) ) ); } } // Remove "archive" text from custom post type archive pages function alante_thinkup_title_select_cpt($title) { if ( is_post_type_archive() ) { $title = post_type_archive_title( '', false ); } return $title; }; add_filter( 'get_the_archive_title', 'alante_thinkup_title_select_cpt' ); /* ---------------------------------------------------------------------------------- ADD BREADCRUMBS FUNCTIONALITY ---------------------------------------------------------------------------------- */ function alante_thinkup_input_breadcrumb() { // Get theme options values. $thinkup_general_breadcrumbdelimeter = alante_thinkup_var ( 'thinkup_general_breadcrumbdelimeter' ); $output = NULL; $count_loop = NULL; $count_categories = NULL; if ( empty( $thinkup_general_breadcrumbdelimeter ) ) { $delimiter = '/'; } else if ( ! empty( $thinkup_general_breadcrumbdelimeter ) ) { $delimiter = ' ' . esc_html( $thinkup_general_breadcrumbdelimeter ) . ' '; } $delimiter_inner = ' • '; $main = __( 'Home', 'alante' ); $maxLength = 30; /* Display breadcumbs if NOT the home page */ if ( ! is_front_page() ) { $output .= '
'; return $output; } } /* ---------------------------------------------------------------------------------- ADD MENU DESCRIPTION FEATURE ---------------------------------------------------------------------------------- */ class alante_thinkup_menudescription extends Walker_Nav_Menu { function start_el(&$output, $item, $depth=0, $args=array(), $id = 0) { global $wp_query; $item_output = NULL; $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; $class_names = $value = ''; $classes = empty( $item->classes ) ? array() : (array) $item->classes; $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ); $class_names = ' class="' . esc_attr( $class_names ) . '"'; $output .= $indent . '