true, 'height' => 200, 'flex-width' => true, 'width' => 1600, 'admin-head-callback' => 'mytheme_admin_header_style', ); add_theme_support( 'custom-header', $header_args ); add_theme_support( 'post-thumbnails' ); //supports featured image // Register primary menu register_nav_menu( 'primary', __( 'Primary Menu', 'appointment' ) ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); // Set the content_width with 900 if ( ! isset( $content_width ) ) $content_width = 900; require_once('theme_setup_data.php'); } // set appoinment page title function appointment_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; // Add the site name. $title .= get_bloginfo( 'name' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( _e( 'Page', 'appointment' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'appointment_title', 10,2 ); add_filter('get_avatar','appointment_add_gravatar_class'); add_theme_support( "title-tag" ); function appointment_add_gravatar_class($class) { $class = str_replace("class='avatar", "class='img-responsive img-circle", $class); return $class; } function appointment_add_to_author_profile( $contactmethods ) { $contactmethods['facebook_profile'] = __('Facebook Profile URL','appointment'); $contactmethods['twitter_profile'] = __('Twitter Profile URL','appointment'); $contactmethods['linkedin_profile'] = __('Linkedin Profile URL','appointment'); $contactmethods['google_profile'] = __('Google Profile URL','appointment'); return $contactmethods; } add_filter( 'user_contactmethods', 'appointment_add_to_author_profile', 10, 1); function appointment_excerpt_length($length ) { return 25; } add_filter( 'excerpt_length', 'appointment_excerpt_length', 999 ); add_filter('get_the_excerpt','appointment_post_slider_excerpt'); add_filter('excerpt_more','__return_false'); function appointment_post_slider_excerpt($output){ if(empty($output)) { } else { if(str_word_count($output) < 25) { return '
'; } else { return ''. ''; } } } function get_home_blog_excerpt() { global $post; $excerpt = get_the_content(); $excerpt = strip_tags(preg_replace(" (\[.*?\])",'',$excerpt)); $excerpt = strip_shortcodes($excerpt); $original_len = strlen($excerpt); $excerpt = substr($excerpt, 0, 145); $len=strlen($excerpt); if($original_len>275) { $excerpt = $excerpt; return $excerpt . ''; } else { return $excerpt; } } ?>