get($themeslug.'_rsslink'); if ($my_feed) { echo ''; } else { feed_links(); } } remove_action( 'wp_head', 'feed_links', 2); // Display the links to the general feeds: Post and Comment Feed add_action('wp_head', 'business_feed_links'); /** * Add link to theme options in Admin bar. */ function business_admin_link() { global $wp_admin_bar; $wp_admin_bar->add_menu( array( 'id' => 'Business', 'title' => 'Business lite Options', 'href' => admin_url('themes.php?page=business') ) ); } add_action( 'admin_bar_menu', 'business_admin_link', 113 ); /** * Custom markup for gallery posts in main blog index. */ function business_custom_gallery_post_format( $content ) { global $options, $themeslug, $post; $root = get_template_directory_uri(); ob_start(); if ( has_post_thumbnail() && $featured_images == '1' && !is_single()) { echo ''; } ?>
get($themeslug.'_post_formats') == '1') : ?>

$post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); if ( $images ) : $total_images = count( $images ); $image = array_shift( $images ); $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); ?>
get($themeslug.'_excerpt_link_text') == '') { $linktext = 'Continue Reading...'; } else { $linktext = $options->get($themeslug.'_excerpt_link_text'); } return '

'; } add_filter('excerpt_more', 'business_new_excerpt_more'); /** * Set custom post excerpt link if excerpt is supplied manually. */ function manual_excerpt_read_more_link($output) { global $themename, $themeslug, $options, $post; if ($options->get($themeslug.'_excerpt_link_text') == '') { $linktext = 'Continue Reading...'; } else { $linktext = $options->get($themeslug.'_excerpt_link_text'); } if(!empty($post->post_excerpt)) return $output . ''; else return $output; } add_filter('the_excerpt', 'manual_excerpt_read_more_link'); /** * Set custom post excerpt length based on theme option. */ function business_new_excerpt_length($length) { global $themename, $themeslug, $options; if ($options->get($themeslug.'_excerpt_length') == '') { $length = '55'; } else { $length = $options->get($themeslug.'_excerpt_length'); } return $length; } add_filter('excerpt_length', 'business_new_excerpt_length'); /** * Attach CSS3PIE behavior to elements */ function business_render_ie_pie() { ?> get($themeslug.'_ga_code')); } add_action('wp_head', 'business_google_analytics'); /** * Register custom menus for header, footer. */ function business_register_menus() { register_nav_menus( array( 'header-menu' => __( 'Header Menu', 'business' )) ); } add_action( 'init', 'business_register_menus' ); /** * Menu fallback if custom menu not used. */ function business_menu_fallback() { global $post; ?> 'Full Sidebar', 'id' => 'sidebar-widgets', 'description' => 'These are widgets for the sidebar.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => 'Left Half Sidebar', 'id' => 'sidebar-left', 'description' => 'These are widgets for the left sidebar.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => 'Right Half Sidebar', 'id' => 'sidebar-right', 'description' => 'These are widgets for the right sidebar.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => 'Box 1', 'id' => 'box-1', 'description' => 'This is the first widget of the four-box section', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => 'Box 2', 'id' => 'box-2', 'description' => 'This is the second widget of the four-box section', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => 'Box 3', 'id' => 'box-3', 'description' => 'This is the third widget of the four-box section', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => 'Box 4', 'id' => 'box-4', 'description' => 'This is the fourth widget of the four-box section', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => 'Footer', 'id' => 'footer-widgets', 'description' => 'These are the footer widgets', 'before_widget' => '', 'before_title' => '', )); } add_action ('widgets_init', 'business_widgets_init'); function business_custom_pagination($pages = '', $range = 4) { $showitems = ($range * 2)+1; global $paged; if(empty($paged)) $paged = 1; if($pages == '') { global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages) { echo '\n"; } } /** * End */ ?>