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( 798, 398, true ); add_image_size( 'ariniom-full-width', 1038, 576, true ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => __( 'Main Menu', 'ariniom' ), 'secondary' => __( 'Secondary menu for footer menu', 'ariniom' ), ) ); // This theme allows users to set a custom background. add_theme_support( 'custom-background', apply_filters( 'ariniom_custom_background_args', array( 'default-color' => 'f5f5f5', ) ) ); // Add support for featured content. add_theme_support( 'featured-content', array( 'featured_content_filter' => 'ariniom_get_featured_posts', 'max_posts' => 6, ) ); } endif; // ariniom_setup add_action( 'after_setup_theme', 'ariniom_setup' ); // Adding breadcrumbs function ariniom_breadcrumbs() { echo '
  • '. __('Home','ariniom'); echo "
  • "; if (is_attachment()) { echo "
  • ". __('attachment:','ariniom'); echo "
  • "; } if (is_category() || is_single()) { if(is_category()) { echo "
  • ". __('Category By:','ariniom'); the_category(' • '); echo "
  • "; } if (is_single()) { echo "
  • "; $category = get_the_category(); echo ''.$category[0]->cat_name.''; echo "
  • "; echo "
  • "; the_title(); echo "
  • "; } } elseif (is_page()) { echo "
  • "; echo the_title(); echo "
  • "; } elseif (is_search()) { echo "
  • ". __('Search Results for...','ariniom'); echo '"'; echo the_search_query(); echo '"'; echo "
  • "; } elseif (is_tag()) { echo "
  • "; single_tag_title(); echo "
  • ";} elseif (is_day()) {echo"
  • ". __('Archive for ','ariniom'); the_time('F jS, Y'); echo'
  • ';} elseif (is_month()) {echo"
  • ". __('Archive for ','ariniom'); the_time('F, Y'); echo'
  • ';} elseif (is_year()) {echo"
  • ". __('Archive for ','ariniom'); the_time('Y'); echo'
  • ';} elseif (is_author()) {echo"
  • ". __('Author Archive for ','ariniom'); printf(__(' %s', 'ariniom'), "" . get_the_author() . ""); echo'
  • ';} elseif (!is_single() && !is_page() && get_post_type() != 'post') { $post_type = get_post_type_object(get_post_type()); //echo $before . $post_type->labels->singular_name . $after; echo $before . '
  • '. _x('Search Results for "','ariniom').'' . get_search_query() . '"' . $after; echo "
  • "; } } //fetch title function ariniom_title() { if (is_category() || is_single()) { if(is_category()) the_category(); if (is_single()) the_title(); } elseif (is_page()) the_title(); elseif (is_search()) echo the_search_query(); } /** * Filter the page title. **/ function ariniom_wp_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', 'display' ); 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( __( 'Page %s', 'ariniom' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'ariniom_wp_title', 10, 2 ); if ( ! function_exists( 'ariniom_entry_meta' ) ) : /** * Set up post entry meta. * * Meta information for current post: categories, tags, permalink, author, and date. **/ function ariniom_entry_meta() { $category_list = get_the_category_list( __( ', ', 'ariniom' ) ); $tag_list = get_the_tag_list( '', __( ', ', 'ariniom' ) ); $date = sprintf( '', esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); $author = sprintf( '%3$s', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'ariniom' ), get_the_author() ) ), get_the_author() ); if ( $tag_list ) { $utility_text = __( '
    Posted in : %1$s on %3$s
    by : %4$s
    Comments: '.get_comments_number().'.
    ', 'ariniom' ); } elseif ( $category_list ) { $utility_text = __( '
    Posted in : %1$s on %3$s
    by : %4$s
    Comments: '.get_comments_number().'.
    ', 'ariniom' ); } else { $utility_text = __( '
    Posted on : %3$s
    by : %4$s
    Comments: '.get_comments_number().'.
    ', 'ariniom' ); } printf( $utility_text, $category_list, $tag_list, $date, $author ); } endif; /**********************************/ function ariniom_special_nav_class( $classes, $item ) { $classes[] = 'special-class'; return $classes; } add_filter( 'nav_menu_css_class', 'ariniom_special_nav_class', 10, 2 ); /** * Register ariniom widget areas. * */ function ariniom_widgets_init() { register_sidebar( array( 'name' => __( 'Content Sidebar', 'ariniom' ), 'id' => 'content-sidebar', 'description' => __( 'Additional sidebar that appears on the right.', 'ariniom' ), 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ', ) ); register_sidebar( array( 'name' => __( 'Footer Sidebar', 'ariniom' ), 'id' => 'footer-sidebar', 'description' => __( 'Appears on footer side', 'ariniom' ), 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ', ) ); } add_action( 'widgets_init', 'ariniom_widgets_init' ); /* ariniom Theme End */ /* * Add Active class to Wp-Nav-Menu */ function ariniom_active_nav_class($classes, $item){ if( in_array('page_item', $classes) ){ $classes[] = 'active '; } return $classes; } add_filter('nav_menu_css_class' , 'ariniom_active_nav_class' , 10 , 2); function ariniom_add_nav_class($output) { $output= preg_replace('/