roles ) ) { if($navstyle!="default"){ $navclass = "navbar-static-top"; } } echo $navclass; } function theme_add_footer() { if( wp_script_is( 'jquery', 'done' ) ) { echo ''; } } add_action( 'wp_footer', 'theme_add_footer' ); add_editor_style('style.css'); /* * Filter post title */ function the_subtitle(){ global $post; $subtitle = get_post_meta( $post->ID, 'theme_page_subtitle',true); if($subtitle){ echo $subtitle; } } /* this function will cal filter for single page and post * before was error, replace everysingle page with * the same title, any other filter please add here */ function theme_post_title($title){ global $post; $newtitle = get_post_meta( $post->ID, 'theme_page_title',true); if($newtitle){ return $newtitle; } return $title; } function add_single_filter() { add_filter('the_title','theme_post_title'); } add_action( 'loop_start', 'add_single_filter' ); function theme_get_option($option){ $frontpage_ID = get_option('page_on_front'); $suffix = wp_meta_suffix(); $options = get_post_meta($frontpage_ID,$suffix,true); if(isset($options[$option])){ return $options[$option]; } } function the_postcover(){ global $post; $cover = 0; if(has_post_thumbnail()){ $classes = 'withcover'; $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID)); $cover = 1; }else{ $classes = 'withoutcover'; } ?>