'', 'default-image' => '', 'default-repeat' => '', 'default-position-x' => '', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '' ); add_theme_support( 'custom-background', $softlights_bg_defaults ); /************** Setup Custom Header to upload Logo *****************/ $softlights_header_defaults = array( 'default-image' => '', 'default-color' => '#fff', 'random-default' => false, 'width' => 1600, 'height' => 130, 'flex-height' => true, 'flex-width' => true, 'default-text-color' => '', 'header-text' => false, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-header', $softlights_header_defaults ); if ( ! isset( $content_width ) ) $content_width = 672; $softlights_settings = get_option('softlights-options'); if($softlights_settings === false) { $softlights_settings = softlights_defaults(); } update_option('softlights-options', $softlights_settings); } /****************** Initialize Theme Default Values **************************************/ function softlights_defaults() { $defaults = array ( 'logo' => '', 'favicon' => '', 'footer' => '', 'showcase-image' => '', 'showcase-title' => '', 'showcase-text' => '', 'showcase-link' => '', 'menu-color' => '#caeffc', 'header-color' => 'transparent', 'menu-font-color' => '#333', 'widgets-menus-color' => '', 'footer-color' => '#b7d3e5', 'link-color' => '#000', 'content-link-color' => '#cc0000', 'showcase-color' => '#f5fefe', 'showcase-font-color' => '#777', 'showcase' => '0', 'comments' => '1', 'reset' => '0' ); return $defaults; } /********************** Adjust content width for full page templates *******************************/ function softlights_content_width() { global $content_width; if(is_page_template( 'full-width.php' ) ) $content_width = 1150; } add_action( 'template_redirect', 'softlights_content_width' ); /********************************* Excerpts fix *******************************/ add_filter('excerpt_more', 'softlights_new_excerpt_more'); function softlights_new_excerpt_more( $more ) { return ''; } function softlights_excerpt() { if( strpos( get_the_content(), 'more-link' ) === false ) { the_excerpt(); } else { the_content('Continue Reading »'); } } /***************************** Admin Theme Options Scripts *************************/ add_action( 'appearance_page_softlights-theme-options', 'softlights_admin_scripts' ); function softlights_admin_scripts($hook) { wp_enqueue_script('jquery'); wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_script( 'sl-script-handle', get_template_directory_uri().'/js/myscript.js', array( 'wp-color-picker','jquery' ), false, true ); wp_enqueue_style ('admin-css', get_template_directory_uri() . '/admin-style.css'); wp_enqueue_script('media-upload'); wp_enqueue_script('thickbox'); wp_enqueue_style('thickbox'); wp_enqueue_script('uploader', get_template_directory_uri().'/js/uploader.js'); } /************************* Theme Custom Colors ************************************/ function softlights_custom_styles() { $softlights_options = get_option('softlights-options'); echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } add_action('wp_head','softlights_custom_styles'); /********************************** Theme Setup scripts, Fonts and styles ************************************/ function softlights_scripts_styles() { if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); wp_register_style('softlights-fonts','//fonts.googleapis.com/css?family=PT+Sans|Oswald|Roboto+Condensed'); wp_enqueue_style( 'softlights-css', get_stylesheet_uri() ); // default stylesheet wp_enqueue_style( 'softlights-fonts'); } add_action ('wp_enqueue_scripts','softlights_scripts_styles'); /******************************** Register Navigation menus ***************************/ add_action( 'init', 'softlights_nav_menu' ); function softlights_nav_menu() { register_nav_menu( 'primary-menu', 'Primary Menu'); register_nav_menu( 'top-menu', 'Top Menu' ); register_nav_menu( 'footer-menu', 'Footer Menu' ); } /************************** Theme Pagination *************************************/ function softlights_pagination() { global $wp_query; $big = 999999999; // need an unlikely integer echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages ) ); } /************ Pagination for Next ******************************/ function softlights_wp_link_pages() { return wp_link_pages(array('before' => '','next_or_number'=>'number', 'previouspagelink' => '« Previous Page', 'nextpagelink'=>'Next Page »')); } /********************************* Theme Widgets Setup **********************************/ add_action( 'widgets_init', 'softlights_widgets_init' ); function softlights_widgets_init() { /* Right and Left Sidebars */ register_sidebar(array( 'name' => 'Right Hand Sidebar', 'id' => 'right-sidebar', 'description' => 'Widgets in this area will be shown on the right-hand side.', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => 'Left Hand Sidebar', 'id' => 'left-sidebar', 'description' => 'Widgets in this area will be shown on the right-hand side.', 'before_title' => '

', 'after_title' => '

' )); /* Top Widget */ register_sidebar(array( 'name' => 'Top Widget', 'id' => 'top-widget', 'description' => 'Appears below navigation menu.', 'before_title' => '

', 'after_title' => '

' )); /* Footer widgets */ register_sidebar( array( 'name' => 'Footer Widget', 'id' => 'footer-widget', 'description' => 'Appears above footer. Max 5 boxes of equal size', 'before_title' => '

', 'after_title' => '

', ) ); } /******************************** Filter the Title *******************************/ function softlights_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', max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'softlights_wp_title', 10, 2 ); /********************************* Theme Admin section *******************************************/ add_action ('admin_menu', 'softlights_admin_menu'); function softlights_admin_menu() { add_theme_page( 'Theme Option','Softlights Options', 'edit_theme_options', 'softlights-theme-options', 'softlights_options_page'); add_action( 'admin_init','softlights_register_mysettings' ); } function softlights_register_mysettings() { // whitelist options register_setting( 'softlights-option-group', 'softlights-options' ,'softlights_options_validate'); } /************************ Validation of admin input data ***********************/ function softlights_options_validate ($input) { $input['logo'] = esc_url_raw($input['logo']); $input['favicon'] = esc_url_raw($input['favicon']); $input['showcase-image'] = esc_url_raw($input['showcase-image']); $input['showcase-title'] = sanitize_text_field($input['showcase-title']); $input['showcase-text'] = sanitize_text_field($input['showcase-text']); $input['showcase-link'] = esc_url_raw($input['showcase-link']); $input['link-color'] = sanitize_text_field($input['link-color']); $input['content-link-color'] = sanitize_text_field($input['content-link-color']); $input['menu-color'] = sanitize_text_field($input['menu-color']); $input['menu-font-color'] = sanitize_text_field($input['menu-font-color']); $input['header-color'] = sanitize_text_field($input['header-color']); $input['footer-color'] = sanitize_text_field($input['footer-color']); $input['widgets-menus-color'] = sanitize_text_field($input['widgets-menus-color']); $input['showcase-color'] = sanitize_text_field($input['showcase-color']); return $input; } /****************************** Theme Options Page *********************************/ function softlights_options_page() { ?>
Theme settings have been reset and default values loaded

'; } $softlights_options = get_option('softlights-options'); ?>
>

Please upload the logo and favicon to media library and paste the URL below.

Logo: Please use header settings to upload the logo or header background image. see on the left

Favicon

Footer Copyright Text
(optional)

Comment Settings

You can chose to completely disable comments and comment form in this theme. If you receive spam and hate comments, disable it. Enabled by default.

> Enable/Disable Comments in Posts/Pages

Showcase Box Settings

> Enable/Disable Showcasebox Box

Showcase Image (optional):
(works any size- try big sizes like 300x300)

Showcase Title (optional):


Showcase Text (optional)


Link URL (optional):


Showcasebox Background Color

Makes changes to background color to showcasebox.

Showcasebox Font Color

Makes changes to font color to showcasebox.

Theme Color Settings

Here you can set the header and footer background color.

Theme Background Color or Image

Set this in background settings under softlights theme. To set a solid background color, you can do this in theme customizer page

Header Background Color

Changes the background of the header:

Footer Background Color

Changes the background color of the footer:

Note: Type transparent for transparency instead of a fixed color. To reset to default color values, simple delete all the color values and hit submit.

Please set the link colors to your theme

1. All Sitewide Links

Makes changes to links to entire site

2. Single Post/Page Link color

This is specific link color, occurs only inside page or post content.

Navigation Menu Background Color:

Changes the background of navigation menu (primary menu)

Navigation Menu - Font Color

This changes only the font color to align with above nav background color

Sidebar/Widgets Background Color

Makes changes to background color of all widgets.

Reset Defaults

Load theme default settings: