post_excerpt; $content = $post->post_content; if ($excerpt) { return $excerpt; } else { $length = 120; $content = preg_replace('/.+/is', "", $content); $content = strip_shortcodes($content); $content = strip_tags($content); $content = str_replace(" ", "", $content); $content = mb_substr($content, 0, $length); return $content; } } endif; if ( !function_exists( 'orderby_modified' ) ): function orderby_modified( $query ) { if( $query->is_main_query() ) { if( $query->is_home() || $query->is_category() || $query->is_archive() || $query->is_tag() ) { $query->set( 'orderby', 'modified' ); } } } add_action( 'pre_get_posts', 'orderby_modified' ); endif; // Widget if ( !function_exists( 'theme_widgets_init' ) ): function theme_widgets_init() { register_sidebar( array( 'name' => 'nav widget', 'id' => 'nav', 'description' => 'nav widget', 'before_widget' => '