__('Primary Widget Area','simpletheme'), 'id' => 'primary-widget-area', 'description' => __('The primary widget area','simpletheme'), 'before_widget' => '
', 'before_title' => '
' . __( 'Read more »', 'simpletheme' ) . '
'; } //Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and simpletheme_continue_reading_link(). function simpletheme_auto_excerpt_more( $more ) { return ' …' . simpletheme_continue_reading_link(); } add_filter( 'excerpt_more', 'simpletheme_auto_excerpt_more' ); //Adds a pretty "Read more »" link to custom post excerpts. function simpletheme_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= simpletheme_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'simpletheme_custom_excerpt_more' ); //Custom more-links for simpletheme function simpletheme_custom_more_link($link) { return ''.$link.''; } add_filter('the_content_more_link', 'simpletheme_custom_more_link'); //////// Tell WordPress to run simpletheme_setup() when the 'after_setup_theme' hook is run. add_action( 'after_setup_theme', 'simpletheme_setup' ); if ( ! function_exists( 'simpletheme_setup' ) ): function simpletheme_setup() { // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // This theme allows users to set a custom background add_custom_background(); // This theme uses post thumbnails add_theme_support( 'post-thumbnails' ); add_image_size( 'extra-featured-image', 620, 200, true ); function simpletheme_featured_content($content) { if (is_home() || is_archive()) { the_post_thumbnail( 'extra-featured-image' ); } return $content; } add_filter( 'the_content', 'simpletheme_featured_content',1 ); function simpletheme_post_image_html( $html, $post_id, $post_image_id ) { $html = '' . $html . ''; return $html; } add_filter( 'post_thumbnail_html', 'simpletheme_post_image_html', 10, 3 ); // Your changeable header business starts here define( 'HEADER_TEXTCOLOR', '' ); // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI. define( 'HEADER_IMAGE', '' ); // default: none IMG // The height and width of your custom header. You can hook into the theme's own filters to change these values. // Add a filter to simpletheme_header_image_width and simpletheme_header_image_height to change these values. define( 'HEADER_IMAGE_WIDTH', apply_filters( 'simpletheme_header_image_width', 950 ) ); define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'simpletheme_header_image_height', 180 ) ); // We'll be using post thumbnails for custom header images on posts and pages. // We want them to be 950 pixels wide by 180 pixels tall. // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); // Don't support text inside the header image. define( 'NO_HEADER_TEXT', true ); // Add a way for the custom header to be styled in the admin panel that controls // custom headers. See simpletheme_admin_header_style(), below. add_custom_image_header( '', 'simpletheme_admin_header_style' ); if ( ! function_exists( 'simpletheme_admin_header_style' ) ) { //Styles the header image displayed on the Appearance > Header admin panel. function simpletheme_admin_header_style() { ?> cat_ID] = $category_list->cat_name; } array_unshift($wp_cats, "Choose a category"); $options = array ( array( "name" => $themename." Options", "type" => "title"), array( "name" => "Social Media Settings", "type" => "section"), array( "type" => "open"), array( "name" => "Facebook User", "std" => "", "id" => $shortname."_facebook", "desc" => "Facebook User", "type" => "text"), array( "name" => "Twitter User", "std" => "", "id" => $shortname."_twitter", "desc" => "Twitter User", "type" => "text"), array( "name" => "linkedin User", "std" => "", "id" => $shortname."_linkedin", "desc" => "linkedin User", "type" => "text"), array( "type" => "close"), array( "name" => "Footer", "type" => "section"), array( "type" => "open"), array( "name" => "Footer copyright text", "desc" => "Enter text used in the left side of the footer.", "id" => $shortname."_footer_text", "type" => "text", "std" => ""), array( "name" => "Google Analytics Code", "desc" => "You can paste your Google Analytics or other tracking code in this box. This will be automatically added to the footer.", "id" => $shortname."_ga_code", "type" => "textarea", "std" => ""), array( "type" => "close") ); function mytheme_add_admin() { global $themename, $shortname, $options; if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { foreach ($options as $value) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } foreach ($options as $value) { if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } header("Location: admin.php?page=functions.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { delete_option( $value['id'] ); } header("Location: admin.php?page=functions.php&reset=true"); die; } } add_theme_page($themename, $themename, 'administrator', basename(__FILE__), 'mytheme_admin'); } function mytheme_add_init() { $file_dir=get_bloginfo('template_directory'); wp_enqueue_style("functions", $file_dir."/functions/functions.css", false, "1.0", "all"); wp_enqueue_script("rm_script", $file_dir."/functions/rm_script.js", false, "1.0"); } function mytheme_admin() { global $themename, $shortname, $options; $i=0; if ( $_REQUEST['saved'] ) echo ''.$themename.' settings saved.
'.$themename.' settings reset.
To easily use the theme, you can use the menu below.
?>/functions/images/trans.gif)