'Home',
'name' => 'Home', // Home
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',));
register_sidebar(array( 'id' => 'Single',
'name' => 'Single', // Single
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array( 'id' => 'Custom',
'name' => 'Custom', // Custom
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
}
add_action( 'init', 'the_widgets_init' );
add_theme_support('automatic-feed-links');
/*----------------------------------------------------*/
/* END of Custom Sidebar */
/*----------------------------------------------------*/
if (is_home() || is_post_template('single.php') || is_page_template('page.php')) {
$content_width = 580;
} else {
$content_width = 900;
}
add_filter('widget_text', 'do_shortcode');
//Thumbnails in Homepage
add_theme_support( 'post-thumbnails' );
add_theme_support( 'post-thumbnails', array( 'post' ) ); // Add it for posts
add_theme_support( 'post-thumbnails', array( 'page' ) ); // Add it for pages
set_post_thumbnail_size( 150, 150, true );
add_theme_support( 'post-thumbnails' );
if ( function_exists( 'add_image_size' ) )
add_theme_support( 'thumbnails' );
add_theme_support( 'post_thumbnail' );
// Add Thumbnail Sizes
if ( function_exists( 'add_image_size' ) ) {
add_image_size( 'post_thumbnail', 250, 250 );
add_image_size( 'home-thumb', 150, 150, true );
add_image_size( 'mini-thumbnail', 80, 80, true );
add_image_size('archive-thumb', 100, 100, true);
}
//Feedburner RSS Thumbnails
function insertThumbnailRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = '' . get_the_post_thumbnail( $post->ID, 'thumbnail', array( 'alt' => get_the_title(), 'title' => get_the_title(), 'style' => 'float:right;' ) ) .
'';
}
return $content;
}
add_filter('the_excerpt_rss', 'insertThumbnailRSS');
add_filter('the_content_feed', 'insertThumbnailRSS');
add_editor_style();
/*--------------------------------*/
/* Global Functions */
/*--------------------------------*/
$GLOBALS['template_path'] = get_template_directory_uri();
//Access the WordPress Categories via an Array
$categories = array();
$categories_obj = get_categories('hide_empty=0');
foreach ($categories_obj as $cat) {
$categories[$cat->cat_ID] = $cat->cat_name;}
$categories_tmp = array_unshift($categories, "Select a category:");
//Access the WordPress Pages via an Array
$pages = array();
$pages_obj = get_pages('sort_column=post_parent,menu_order');
foreach ($pages_obj as $page) {
$pages[$page->ID] = $page->post_name; }
$pages_tmp = array_unshift($pages, "Select a page:");
/*--------------------------------*/
/* END - Global Functions */
/*--------------------------------*/
// Make Menu Support compatible with earlier WP versions
function theme_nav() {
if ( function_exists( 'wp_nav_menu' ) )
wp_nav_menu( 'sort_column=menu_order&container_class=menu&menu_class=&menu_location=main-menu&fallback_cb=gpptheme_nav_fallback' );
else
theme_nav_fallback();
}
// Create our GPP Fallback Menu
function theme_nav_fallback() {
wp_page_menu( 'show_home=1&menu_class=menu' );
}
add_action('after_setup_theme', 'my_theme_setup');
function my_theme_setup(){
load_theme_textdomain('wp_liteflex', get_template_directory() . '/includes/languages');
}
/*----------------------------------------------------*/
/* Template Comments */
/*----------------------------------------------------*/
function custom_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>
id="li-comment-">
Your comment is awaiting moderation.