for posts and comments. add_theme_support( 'automatic-feed-links' ); // This theme uses wp_nav_menu() in one location. register_nav_menu( 'primary', __( 'Primary Menu', 'html5_blog_magazine' ) ); /* * This theme supports custom background color and image, and here * we also set up the default background color. */ add_theme_support( 'custom-background', array( 'default-color' => 'e6e6e6', ) ); // This theme uses a custom image size for featured images, displayed on "standard" posts. add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop } add_action( 'after_setup_theme', 'html5_blog_magazine_setup' ); // This theme uses wp_nav_menu() in one location. register_nav_menu( 'primary', __( 'Primary Menu', 'html5_blog_magazine' ) ); if ( ! isset( $content_width ) ) { $content_width = 960; } // Enable post thumbnails if ( function_exists('add_theme_support') ) { add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( true ); // Normal post thumbnails add_image_size( 'single-post-thumbnail', 158, 99, true ); // Permalink thumbnail size add_image_size( 'home-small', 173, 129, true ); // Home Small } if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'Sidebar', 'id' => 'sidebar-widget-area', 'before_widget' => '
', 'before_title' => '

', 'after_title' => '

', 'after_widget' => '
', )); register_sidebar(array( 'name' => 'Footer Widget Area 1', 'id' => 'footer-widget-area', 'before_widget' => '
', 'before_title' => '

', 'after_title' => '

', 'after_widget' => '
', )); register_sidebar(array( 'name' => 'Footer Widget Area 2', 'id' => '2nd-footer-widget-area', 'before_widget' => '
', 'before_title' => '

', 'after_title' => '

', 'after_widget' => '
', )); register_sidebar(array( 'name' => 'Footer Widget Area 3', 'id' => '3rd-footer-widget-area', 'before_widget' => '
', 'before_title' => '

', 'after_title' => '

', 'after_widget' => '
', )); } function excerpt($limit) { $excerpt = explode(' ', get_the_excerpt(), $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(" ",$excerpt).'...'; } else { $excerpt = implode(" ",$excerpt); } $excerpt = preg_replace('`\[[^\]]*\]`','',$excerpt); return $excerpt; } function content($limit) { $content = explode(' ', get_the_content(), $limit); if (count($content)>=$limit) { array_pop($content); $content = implode(" ",$content).'...'; } else { $content = implode(" ",$content); } $content = preg_replace('/\[.+\]/','', $content); $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); return $content; } /** * add a default-gravatar to options */ if ( !function_exists('fb_addgravatar') ) { function fb_addgravatar( $avatar_defaults ) { $myavatar = get_bloginfo('template_directory') . '/images/avatar.gif'; $avatar_defaults[$myavatar] = 'people'; $myavatar2 = get_bloginfo('template_directory') . '/images/myavatar.png'; $avatar_defaults[$myavatar2] = 'wpengineer.com'; return $avatar_defaults; } add_filter( 'avatar_defaults', 'fb_addgravatar' ); } ?> cat_ID] = $of_cat->cat_name;} $categories_tmp = array_unshift($of_categories, "Select a category:"); function get_category_id($cat_name){ $term = get_term_by('name', $cat_name, 'category'); return $term->term_id; } $themename = "HTML5 Blog Magazine"; $shortname = "html5"; $options = array ( array( "name" => "Theme Options Page", "type" => "title"), array( "type" => "open"), array( "name" => "Logo", "desc" => "Enter a path to your logo file, recommended size 300x100", "id" => $shortname."_logo", "std" => "", "type" => "text"), array( "name" => "Google Analytics", "desc" => "Enter the google analytics number after the UA-", "id" => $shortname."_google", "std" => "", "type" => "text"), array( "name" => "Banner Image", "desc" => "Add the url to the banner image", "id" => $shortname."_adimage", "std" => "", "type" => "text"), array( "name" => "Banner Link", "desc" => "Add the url to your landing page", "id" => $shortname."_adurl", "std" => "", "type" => "text"), array( "name" => "Twitter Username", "desc" => "Enter your Twitter username", "id" => $shortname."_tt", "std" => "", "type" => "text"), array( "name" => "Facebook Link", "desc" => "Enter the complete url to your FB Fan", "id" => $shortname."_fb", "std" => "", "type" => "text"), array( "name" => "Feedburner Link", "desc" => "Enter the complete url to your Feedburner feed", "id" => $shortname."_rss", "std" => "", "type" => "text"), array( "name" => "Sidebar Category", "desc" => "Select a category for the sidebar posts - this category will be excluded from main posts.", "id" => $shortname."_sidecat", "std" => "Select a category:", "type" => "select", "options" => $of_categories), array( "name" => "Second Sidebar Category", "desc" => "Select a category for the post in the second sidebar - this category will also be excluded from main posts.", "id" => $shortname."_sidecat2", "std" => "Select a category:", "type" => "select", "options" => $of_categories), array( "type" => "close") ); function mytheme_add_admin() { global $themename, $shortname, $options; if ( isset( $_GET['page'] ) && $_GET['page'] == basename(__FILE__) ) { if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] =='save' ) { foreach ($options as $value) { if( isset( $value['id'] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } } foreach ($options as $value) { if( isset( $value['id'] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { if( isset( $value['id'] ) ) { delete_option( $value['id'] ); } } } } else if( isset( $_REQUEST['action'] ) && $_REQUEST['action'] =='reset' ) { foreach ($options as $value) { if( isset( $value['id'] ) ) { delete_option( $value['id'] ); } } } } add_theme_page($themename." Options", "".$themename." Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_admin() { global $themename, $shortname, $options; if ( isset( $_REQUEST['saved'] ) && $_REQUEST['saved'] ) echo '

'.$themename.' settings saved.

'; if ( isset( $_REQUEST['reset'] ) && $_REQUEST['reset'] ) echo '

'.$themename.' settings reset.

'; ?>

Options Page

Mange your theme here.. if you found any bugs please contact support@innovedesigns.com

$_REQUEST['action']
" />
 
 
 
 
 
 
 
 

max_num_pages > 1 ) : ?> comment_type ) : case 'pingback' : case 'trackback' : // Display trackbacks differently than normal comments. ?>
  • id="comment-">

    ', '' ); ?>

  • id="li-comment-">
    %1$s %2$s', get_comment_author_link(), // If current post author is also comment author, make it known visually. ( $comment->user_id === $post->post_author ) ? ' ' . __( 'Post author', 'html5_blog_magazine' ) . '' : '' ); printf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s', 'html5_blog_magazine' ), get_comment_date(), get_comment_time() ) ); ?>
    comment_approved ) : ?>

    ', '

    ' ); ?>
    __( 'Reply', 'html5_blog_magazine' ), 'after' => ' ', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>