'.get_theme_mod( 'real_custom_css' ).''; echo ''; } function realestate_excerpt_length( $length ) { return get_theme_mod( 'real_excerpt_length' ); } add_filter( 'excerpt_length', 'realestate_excerpt_length'); add_action( 'after_setup_theme', 'realestate_head_setup' ); function realestate_head_setup() { // Load text domain for translation-ready load_theme_textdomain( 'is-realestate', get_template_directory() . '/assets/lang' ); add_theme_support( 'title-tag' ); add_theme_support( 'post-thumbnails' ); //supports featured image add_theme_support( 'automatic-feed-links'); add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); add_theme_support( 'customize-selective-refresh-widgets' ); /* for Menu */ register_nav_menu( 'primary', __( 'Primary Menu', 'is-realestate' ) ); if ( ! isset( $content_width ) ) $content_width = 900; // add image sizes add_image_size('realestate-home-slide',1200,628,true); add_image_size('realestate-blog-thumb',1200,400,true); add_image_size('realestate-property-thumb',600,400,true); $header_image = get_template_directory_uri().'/assets/images/slider/2.jpg'; $defaults = array( 'default-image' => $header_image, 'flex-height' => true, 'flex-width' => true, 'uploads' => true, 'random-default' => true, 'header-text' => true, 'default-text-color' => '#fff', 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-header', $defaults ); $defaults = array( 'default-color' => '#fff', 'default-image' => '', 'default-repeat' => 'repeat', 'default-position-x' => 'left', 'default-position-y' => 'top', 'default-size' => 'auto', 'default-attachment' => 'scroll', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '' ); add_theme_support( 'custom-background', $defaults ); $font_url = str_replace( ',', '%2C', '//fonts.googleapis.com/css?family=Lato:300,400,700' ); add_editor_style( $font_url ); } function realestate_fallback_page_menu( $args = array() ) { $defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => ''); $args = wp_parse_args( $args, $defaults ); $args = apply_filters( 'wp_page_menu_args', $args ); $menu = ''; $list_args = $args; // Show Home in the menu if ( ! empty($args['show_home']) ) { if ( true === $args['show_home'] || '1' === $args['show_home'] || 1 === $args['show_home'] ) $text = 'Home'; else $text = $args['show_home']; $class = ''; if ( is_front_page() && !is_paged() ) $class = 'class="current_page_item"'; $menu .= '
  • ' . $args['link_before'] . $text . $args['link_after'] . '
  • '; // If the front page is a page, add it to the exclude list if (get_option('show_on_front') == 'page') { if ( !empty( $list_args['exclude'] ) ) { $list_args['exclude'] .= ','; } else { $list_args['exclude'] = ''; } $list_args['exclude'] .= get_option('page_on_front'); } } $list_args['echo'] = false; $list_args['title_li'] = ''; $list_args['walker'] = new realestate_walker_page_menu; $menu .= str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages($list_args) ); if ( $menu ) $menu = ''; $menu = '
    ' . $menu . "
    \n"; $menu = apply_filters( 'wp_page_menu', $menu, $args ); if ( $args['echo'] ) echo $menu; else return $menu; } class realestate_walker_page_menu extends Walker_Page{ function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat("\t", $depth); $output .= "\n$indent