for posts and comments. add_theme_support( 'automatic-feed-links' ); // Enable support for Post Thumbnails, and declare two sizes. add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size(); add_image_size( 'customizable-full-width', 1038, 576, true ); add_image_size( 'customizable-blog-width', 730, 428, true ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => __( 'Top primary menu', 'customizable' ), 'secondary' => __( 'Secondary menu in footer', 'customizable' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', ) ); /* * Enable support for Post Formats. * See http://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery', ) ); // This theme allows users to set a custom background. add_theme_support( 'custom-background', apply_filters( 'customizable_custom_background_args', array( 'default-color' => 'f5f5f5', ) ) ); // Add support for featured content. add_theme_support( 'featured-content', array( 'featured_content_filter' => 'customizable_get_featured_posts', 'max_posts' => 6, ) ); // This theme uses its own gallery styles. add_filter( 'use_default_gallery_style', '__return_false' ); } endif; // customizable_setup add_action( 'after_setup_theme', 'customizable_setup' ); // Theme option require_once('theme-options/fasterthemes.php'); // Custome social widget require_once('inc/social-custom-widget.php'); // Implement Custom Header features. require get_template_directory() . '/inc/custom-header.php'; add_action('wp_enqueue_scripts','customizable_load_scripts'); function customizable_load_scripts(){ wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.0.2' ); wp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '3.0.2' ); wp_enqueue_style( 'customizable-style', get_stylesheet_uri(),array('bootstrap')); wp_enqueue_style('owl-carousel-css',get_template_directory_uri().'/css/owl.carousel.css',array(),'',''); wp_enqueue_script( 'owl-carousel-script', get_template_directory_uri() . '/js/owl.carousel.js', array( 'jquery' ), '20131209', true ); wp_enqueue_script('sliderjs',get_template_directory_uri().'/js/responsiveslides.min.js',array('jquery')); wp_enqueue_script('customizable-default-js', get_template_directory_uri() . '/js/default.js', array('jquery'), '20131209', true); if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); } //Theme Title function customizable_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) { return $title; } // Add the site name. $title .= get_bloginfo( 'name', 'display' ); // Add the site description for the home/front page. $customizable_site_description = get_bloginfo( 'description', 'display' ); if ( $customizable_site_description && ( is_home() || is_front_page() ) ) { $title = "$title $sep $customizable_site_description"; } // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) { $title = "$title $sep " . sprintf( __( 'Page %s', 'customizable' ), max( $paged, $page ) ); } return $title; } add_filter( 'wp_title', 'customizable_wp_title', 10, 2 ); function customizable_font_url() { $customizable_font_url = ''; /* * Translators: If there are characters in your language that are not supported * by Lato, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Lato font: on or off', 'customizable' ) ) { $customizable_font_url = add_query_arg( 'family', urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ), "//fonts.googleapis.com/css" ); } return $customizable_font_url; } /** * Register customizable widget areas. * */ function customizable_widgets_init() { register_sidebar( array( 'name' => __( 'Content Sidebar', 'customizable' ), 'id' => 'content-sidebar', 'description' => __( 'Additional sidebar that appears on the right.', 'customizable' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer area one', 'customizable' ), 'id' => 'footer-one', 'description' => __( 'Appears on footer side', 'customizable' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer area two', 'customizable' ), 'id' => 'footer-two', 'description' => __( 'Appears on footer side', 'customizable' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer area three', 'customizable' ), 'id' => 'footer-three', 'description' => __( 'Appears on footer side', 'customizable' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer area four', 'customizable' ), 'id' => 'footer-four', 'description' => __( 'Appears on footer side', 'customizable' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'customizable_widgets_init' ); function customizable_read_more( ) { return ' ...'; } add_filter( 'excerpt_more', 'customizable_read_more' ); function customizable_breadcrumbs() { global $post; echo '
    '; if (!is_home()) { echo '
  1. '; echo 'Home'; echo '
  2. / '; if (is_category() || is_single()) { echo '
  3. '; the_category('
  4. /
  5. '); if (is_single()) { echo '
  6. /
  7. '; the_title(); echo '
  8. '; } } elseif (is_page()) { if($post->post_parent){ $customizable_anc = get_post_ancestors( $post->ID ); $customizable_title = get_the_title(); foreach ( $customizable_anc as $customizable_ancestor ) { $customizable_output = '
  9. '.get_the_title($customizable_ancestor).'
  10. / '; } echo $customizable_output; echo ' '.$customizable_title.''; } else { echo '
  11. '.get_the_title().'
  12. '; } } if (is_tag()) {single_tag_title();} if (is_day()) {echo"
  13. Archive for "; the_time('F jS, Y'); echo'
  14. ';} if (is_month()) {echo"
  15. Archive for "; the_time('F, Y'); echo'
  16. ';} if (is_year()) {echo"
  17. Archive for "; the_time('Y'); echo'
  18. ';} if (is_author()) {echo"
  19. Author Archive"; echo'
  20. ';} if (isset($_GET['paged']) && !empty($_GET['paged'])) {echo "
  21. Blog Archives"; echo'
  22. ';} if (is_search()) {echo"
  23. Search Results"; echo'
  24. ';} if (is_404()) {echo"
  25. 404"; echo'
  26. ';} } echo '
'; } /** * Add default menu style if menu is not set from the backend. */ function customizable_add_menuid ($page_markup) { preg_match('/^
/i', $page_markup, $customizable_matches); $customizable_toreplace = array(''); $customizable_replace = array('', ''); $customizable_new_markup = str_replace($customizable_toreplace,$customizable_replace, $page_markup); $customizable_new_markup= preg_replace('/