Steht oben. das Options Theme von Thadlock.
Hier der Code:
php get_header(); ?>
<?php
// If is home archives
if(is_paged()) :
include(OP_INCLUDES . '/home-paged.php');
// If is home and not paged
elseif(is_front_page() && !is_paged()) :
global $settings;
$home_arr = array(
$settings['home1'],
$settings['home2'],
$settings['home3'],
$settings['home4'],
$settings['home5']
);
// Default to full posts if nothing is set
if(($settings['home1'] && $settings['home2'] && $settings['home3'] && $settings['home4'] && $settings['home5']) == false) :
home_structure(__('Full Posts','options'));
// Loop through each home section
else :
foreach($home_arr as $home) :
if($home !== __('None','options')) home_structure($home);
endforeach;
endif;
endif;
/***********************************************************
* home_structure() - Displays correct home section
* @since 1.0
***********************************************************/
function home_structure($j) {
$do_not_duplicate = array();
global $do_not_duplicate;
// Post tabs/sections/blocks
global $settings;
$settings = get_option('options_theme_settings');
$op_type_arr = array(
$settings['pb1'],
$settings['pb2'],
$settings['pb3'],
$settings['pb4'],
$settings['pb5'],
$settings['pb6'],
$settings['pb7'],
$settings['pb8'],
);
// Switch statement to run through the list of possibilities
switch($j) {
// Feature options
case __('Feature','options'):
include(OP_INCLUDES . '/feature.php');
break;
case __('Features Gallery','options'):
include(OP_INCLUDES . '/features-gallery.php');
break;
case __('Features Numbers','options'):
include(OP_INCLUDES . '/features-numbers.php');
break;
// Post block/section/tab options
case __('Post Blocks','options'):
include(OP_INCLUDES . '/post-blocks.php');
break;
case __('Post Sections','options'):
include(OP_INCLUDES . '/post-sections.php');
break;
case __('Post Block Tabs','options'):
include(OP_INCLUDES . '/post-block-tabs.php');
break;
case __('Post List Tabs','options'):
include(OP_INCLUDES . '/post-list-tabs.php');
break;
case __('Post Tabs','options'):
include(OP_INCLUDES . '/post-tabs.php');
break;
// Video options
case __('Video Tabbed','options'):
include(OP_INCLUDES . '/video-tabbed.php');
break;
case __('Video Numbers','options'):
include(OP_INCLUDES . '/video-numbers.php');
break;
// Featured photos
case __('Flickr Photos','options'):
include(OP_INCLUDES . '/flickr.php');
break;
case __('Gallery Stream','options'):
include(OP_INCLUDES . '/gallery-stream.php');
break;
// Excerpts
case __('Excerpts','options'):
include(OP_INCLUDES . '/excerpts.php');
break;
// Full Posts
case __('Full Posts','options'):
include(OP_INCLUDES . '/full-posts.php');
break;
// Tag, Category, Bookmarks, and Author Clouds
case __('Tag Cloud','options'):
include(OP_INCLUDES . '/tag-cloud.php');
break;
case __('Category Cloud','options'):
include(OP_INCLUDES . '/category-cloud.php');
break;
case __('Author Cloud','options'):
include(OP_INCLUDES . '/author-cloud.php');
break;
case __('Bookmark Cloud','options');
include(OP_INCLUDES . '/bookmark-cloud.php');
break;
// Custom home sections/modules
case __('Home Insert 1','options'):
include(OP_INCLUDES . '/insert-1.php');
break;
case __('Home Insert 2','options'):
include(OP_INCLUDES . '/insert-2.php');
break;
case __('Home Insert 3','options'):
include(OP_INCLUDES . '/insert-3.php');
break;
// No option selected (None)
case __('None','options'):
break;
// Default, break out of the switch if nothing is chosen
default: break;
} // End switch
}
?>
<?php get_footer(); ?>
Alles anzeigen