for posts and comments. add_theme_support( 'automatic-feed-links' ); global $content_width; if ( ! isset( $content_width ) ) $content_width = 900; /* pixels */ add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 798, 398, true ); add_image_size( 'aripop-full-width', 1038, 576, true ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => __( 'Main Menu', 'aripop' ), 'secondary' => __( 'Secondary menu for footer menu', 'aripop' ), ) ); // This theme allows users to set a custom background. add_theme_support( 'custom-background', apply_filters( 'aripop_custom_background_args', array( 'default-color' => 'f5f5f5', ) ) ); // Add support for featured content. add_theme_support( 'featured-content', array( 'featured_content_filter' => 'aripop_get_featured_posts', 'max_posts' => 6, ) ); // This theme uses its own gallery styles. add_filter( 'use_default_gallery_style', '__return_false' ); } endif; // aripop_setup add_action( 'after_setup_theme', 'aripop_setup' ); function aripop_of_head_css() { $output = ''; $custom_css = esc_attr(get_theme_mod( 'custom_css' ) ); if ($custom_css <> '') { $output .= $custom_css . "\n"; } // Output styles if ($output <> '') { $output = "\n\n"; echo $output; } } add_action('wp_head', 'aripop_of_head_css'); // Adding breadcrumbs function aripop_breadcrumbs() { echo '
  • '. __('Home','aripop'); echo "
  • "; if (is_attachment()) { echo "
  • ". __('attachment:','aripop'); echo "
  • "; } if (is_category() || is_single()) { if(is_category()) { echo "
  • ". __('Category By:','aripop'); 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...','aripop'); echo '"'; echo the_search_query(); echo '"'; echo "
  • "; } elseif (is_tag()) { echo "
  • "; single_tag_title(); echo "
  • ";} elseif (is_day()) {echo"
  • ". __('Archive for ','aripop'); the_time('F jS, Y'); echo'
  • ';} elseif (is_month()) {echo"
  • ". __('Archive for ','aripop'); the_time('F, Y'); echo'
  • ';} elseif (is_year()) {echo"
  • ". __('Archive for ','aripop'); the_time('Y'); echo'
  • ';} elseif (is_author()) {echo"
  • ". __('Author Archive for ','aripop'); printf(__(' %s', 'aripop'), "" . 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 '
  • '. __('Search Results for "','aripop').'' . get_search_query() . '"' ; echo "
  • "; } } if ( ! function_exists( 'aripop_entry_meta' ) ) : /** * Set up post entry meta. * * Meta information for current post: categories, tags, permalink, author, and date. **/ function aripop_entry_meta() { $category_list = get_the_category_list( __( ', ', 'aripop' ) ); $tag_list = get_the_tag_list( '', __( ', ', 'aripop' ) ); $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', 'aripop' ), 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().'.
    ', 'aripop' ); } elseif ( $category_list ) { $utility_text = __( '
    Posted in : %1$s on %3$s
    by : %4$s
    Comments: '.get_comments_number().'.
    ', 'aripop' ); } else { $utility_text = __( '
    Posted on : %3$s
    by : %4$s
    Comments: '.get_comments_number().'.
    ', 'aripop' ); } printf( $utility_text, $category_list, $tag_list, $date, $author ); } endif; /**********************************/ function aripop_special_nav_class( $classes, $item ) { $classes[] = 'special-class'; return $classes; } add_filter( 'nav_menu_css_class', 'aripop_special_nav_class', 10, 2 ); /** * Register aripop widget areas. * */ function aripop_widgets_init() { register_sidebar( array( 'name' => __( 'Content Sidebar', 'aripop' ), 'id' => 'content-sidebar', 'description' => __( 'Additional sidebar that appears on the right.', 'aripop' ), 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

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