</div><?php } } } else { get_template_part('post', 'noresults'); } if ($is_post_wrap == '1') { ?> </div><?php } get_template_part('navigation'); ?> <?php $theme->hook('content_after'); ?> </div><!-- #content --> <?php get_sidebars(); ?> <?php $theme->hook('main_after'); ?> </div><!-- #main --> <?php get_footer();
</div><!-- #content-wrap --> <div id="primary-sidebar-wrap" class="span-8 last"> <?php get_sidebars('primary'); ?> </div><!-- #primary-sidebar-wrap --> </div><!-- #main --> <?php get_footer();
* Learn more about the get_template_part() function: http://codex.wordpress.org/Function_Reference/get_template_part */ $is_post_wrap++; if ($is_post_wrap == '1') { ?> <div><?php } get_template_part('post', 'homepage'); if ($is_post_wrap == '2') { $is_post_wrap = 0; ?> </div><?php } } } else { get_template_part('post', 'noresults'); } ?> </div> </td> <td> <div style="float:right"> <?php get_sidebars(null); ?> </div> </td> </tr> </table> <?php get_footer();
/*-----------------------------------------------------------------------------------*/ /* Toggles Config /*-----------------------------------------------------------------------------------*/ $fusion_shortcodes['toggles'] = array('no_preview' => true, 'params' => array('divider_line' => array('std' => 'default', 'type' => 'select', 'label' => __('Divider Line', 'fusion-core'), 'desc' => __('Choose to display a divider line between each item.', 'fusion-core'), 'options' => array('' => 'Default', 'yes' => 'Yes', 'no' => 'No')), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core')), 'id' => array('std' => '', 'type' => 'text', 'label' => __('CSS ID', 'fusion-core'), 'desc' => __('Add an ID to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[accordian divider_line="{{divider_line}}" class="{{class}}" id="{{id}}"]{{child_shortcode}}[/accordian]', 'popup_title' => __('Insert Toggles Shortcode', 'fusion-core'), 'child_shortcode' => array('params' => array('title' => array('std' => '', 'type' => 'text', 'label' => __('Title', 'fusion-core'), 'desc' => __('Insert the toggle title', 'fusion-core')), 'open' => array('type' => 'select', 'label' => __('Open by Default', 'fusion-core'), 'desc' => __('Choose to have the toggle open when page loads', 'fusion-core'), 'options' => $reverse_choices), 'content' => array('std' => '', 'type' => 'textarea', 'label' => __('Toggle Content', 'fusion-core'), 'desc' => __('Insert the toggle content', 'fusion-core'))), 'shortcode' => '[toggle title="{{title}}" open="{{open}}"]{{content}}[/toggle]', 'clone_button' => __('Add Toggle', 'fusion-core'))); /*-----------------------------------------------------------------------------------*/ /* Tooltip Config /*-----------------------------------------------------------------------------------*/ $fusion_shortcodes['tooltip'] = array('no_preview' => true, 'params' => array('title' => array('std' => '', 'type' => 'text', 'label' => __('Tooltip Text', 'fusion-core'), 'desc' => __('Insert the text that displays in the tooltip', 'fusion-core')), 'placement' => array('type' => 'select', 'label' => __('Tooltip Position', 'fusion-core'), 'desc' => __('Choose the display position.', 'fusion-core'), 'options' => array('top' => __('Top', 'fusion-core'), 'bottom' => __('Bottom', 'fusion-core'), 'left' => __('Left', 'fusion-core'), 'Right' => __('Right', 'fusion-core'))), 'trigger' => array('type' => 'select', 'label' => __('Tooltip Trigger', 'fusion-core'), 'desc' => __('Choose action to trigger the tooltip.', 'fusion-core'), 'options' => array('hover' => __('Hover', 'fusion-core'), 'click' => __('Click', 'fusion-core'))), 'content' => array('std' => '', 'type' => 'textarea', 'label' => __('Content', 'fusion-core'), 'desc' => __('Insert the text that will activate the tooltip hover', 'fusion-core')), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core')), 'id' => array('std' => '', 'type' => 'text', 'label' => __('CSS ID', 'fusion-core'), 'desc' => __('Add an ID to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[tooltip title="{{title}}" placement="{{placement}}" trigger="{{trigger}}" class="{{class}}" id="{{id}}"]{{content}}[/tooltip]', 'popup_title' => __('Tooltip Shortcode', 'fusion-core')); /*-----------------------------------------------------------------------------------*/ /* Vimeo Config /*-----------------------------------------------------------------------------------*/ $fusion_shortcodes['vimeo'] = array('no_preview' => true, 'params' => array('id' => array('std' => '', 'type' => 'text', 'label' => __('Video ID', 'fusion-core'), 'desc' => __('For example the Video ID for <br />https://vimeo.com/75230326 is 75230326', 'fusion-core')), 'width' => array('std' => '600', 'type' => 'text', 'label' => __('Width', 'fusion-core'), 'desc' => __('In pixels but only enter a number, ex: 600', 'fusion-core')), 'height' => array('std' => '350', 'type' => 'text', 'label' => __('Height', 'fusion-core'), 'desc' => __('In pixels but enter a number, ex: 350', 'fusion-core')), 'autoplay' => array('type' => 'select', 'label' => __('Autoplay Video', 'fusion-core'), 'desc' => __('Set to yes to make video autoplaying', 'fusion-core'), 'options' => $reverse_choices), 'apiparams' => array('std' => '', 'type' => 'text', 'label' => __('AdditionalAPI Parameter', 'fusion-core'), 'desc' => __('Use additional API parameter, for example &title=0 to disable title on video. VimeoPlus account may be required.', 'fusion-core')), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[vimeo id="{{id}}" width="{{width}}" height="{{height}}" autoplay="{{autoplay}}" api_params="{{apiparams}}" class="{{class}}"]', 'popup_title' => __('Vimeo Shortcode', 'fusion-core')); /*-----------------------------------------------------------------------------------*/ /* Widget Area Config /*-----------------------------------------------------------------------------------*/ $fusion_shortcodes['fusion_widget_area'] = array('params' => array('name' => array('std' => '', 'type' => 'select', 'label' => __('Widget Area Name', 'fusion-core'), 'desc' => __('Choose a background color for the widget area.', 'fusion-core'), 'options' => get_sidebars()), 'background_color' => array('type' => 'colorpicker', 'label' => __('Background Color', 'fusion-core'), 'desc' => __('Choose a background color for the widget area.', 'fusion-core')), 'padding' => array('std' => '', 'type' => 'text', 'label' => __('Padding', 'fusion-core'), 'desc' => __('In pixels or percentage, ex: 10px or 10%.', 'fusion-core')), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core')), 'id' => array('std' => '', 'type' => 'text', 'label' => __('CSS ID', 'fusion-core'), 'desc' => __('Add an ID to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[fusion_widget_area name="{{name}}" background_color="{{background_color}}" padding="{{padding}}" class="{{class}}" id="{{id}}"][/fusion_widget_area]', 'popup_title' => __('Widget Area Shortcode', 'fusion-core'), 'no_preview' => true); /*-----------------------------------------------------------------------------------*/ /* Woo Featured Slider Config /*-----------------------------------------------------------------------------------*/ $fusion_shortcodes['woofeatured'] = array('no_preview' => true, 'params' => array('picture_size' => array('type' => 'select', 'label' => __('Picture Size', 'fusion-core'), 'desc' => __('fixed = width and height will be fixed <br />auto = width and height will adjust to the image.', 'fusion-core'), 'options' => array('auto' => __('Auto', 'fusion-core'), 'fixed' => __('Fixed', 'fusion-core'))), 'carousel_layout' => array('type' => 'select', 'label' => __('Carousel Layout', 'fusion-core'), 'desc' => __('Choose to show titles on rollover image, or below image.', 'fusion-core'), 'options' => array('title_on_rollover' => __('Title on rollover', 'fusion-core'), 'title_below_image' => __('Title below image', 'fusion-core'))), 'autoplay' => array('type' => 'select', 'label' => __('Autoplay', 'fusion-core'), 'desc' => __('Choose to autoplay the carousel.', 'fusion-core'), 'options' => $reverse_choices), 'columns' => array('std' => '5', 'type' => 'select', 'label' => __('Maximum Columns', 'fusion-core'), 'desc' => __('Select the number of max columns to display.', 'fusion-core'), 'options' => fusion_shortcodes_range(6, false)), 'column_spacing' => array('std' => '10', 'type' => 'text', 'label' => __('Column Spacing', 'fusion-core'), "desc" => __("Insert the amount of spacing between items without 'px'. ex: 13.", "fusion-core")), 'scroll_items' => array('std' => '', 'type' => 'text', 'label' => __('Scroll Items', 'fusion-core'), "desc" => __("Insert the amount of items to scroll. Leave empty to scroll number of visible items.", "fusion-core")), 'show_nav' => array('type' => 'select', 'label' => __('Show Navigation', 'fusion-core'), 'desc' => __('Choose to show navigation buttons on the carousel.', 'fusion-core'), 'options' => $choices), 'mouse_scroll' => array('type' => 'select', 'label' => __('Mouse Scroll', 'fusion-core'), 'desc' => __('Choose to enable mouse drag control on the carousel.', 'fusion-core'), 'options' => $reverse_choices), 'show_cats' => array('type' => 'select', 'label' => __('Show Categories', 'fusion-core'), 'desc' => __('Choose to show or hide the categories', 'fusion-core'), 'options' => $reverse_choices), 'show_price' => array('type' => 'select', 'label' => __('Show Price', 'fusion-core'), 'desc' => __('Choose to show or hide the price', 'fusion-core'), 'options' => $reverse_choices), 'show_buttons' => array('type' => 'select', 'label' => __('Show Buttons', 'fusion-core'), 'desc' => __('Choose to show or hide the icon buttons', 'fusion-core'), 'options' => $reverse_choices), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core')), 'id' => array('std' => '', 'type' => 'text', 'label' => __('CSS ID', 'fusion-core'), 'desc' => __('Add an ID to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[featured_products_slider picture_size="{{picture_size}}" carousel_layout="{{carousel_layout}}" autoplay="{{autoplay}}" columns="{{columns}}" column_spacing="{{column_spacing}}" scroll_items="{{scroll_items}}" show_nav="{{show_nav}}" mouse_scroll="{{mouse_scroll}}" show_price="{{show_price}}" show_buttons="{{show_buttons}}" class="{{class}}" id="{{id}}"]', 'popup_title' => __('Woocommerce Featured Products Slider Shortcode', 'fusion-core')); /*-----------------------------------------------------------------------------------*/ /* Woo Products Slider Config /*-----------------------------------------------------------------------------------*/ $fusion_shortcodes['wooproducts'] = array('params' => array('picture_size' => array('type' => 'select', 'label' => __('Picture Size', 'fusion-core'), 'desc' => __('fixed = width and height will be fixed <br />auto = width and height will adjust to the image.', 'fusion-core'), 'options' => array('fixed' => __('Fixed', 'fusion-core'), 'auto' => __('Auto', 'fusion-core'))), 'cat_slug' => array('type' => 'multiple_select', 'label' => __('Categories', 'fusion-core'), 'desc' => __('Select a category or leave blank for all', 'fusion-core'), 'options' => fusion_shortcodes_categories('product_cat')), 'number_posts' => array('std' => 5, 'type' => 'text', 'label' => __('Number of Products', 'fusion-core'), 'desc' => __('Select the number of products to display', 'fusion-core')), 'carousel_layout' => array('type' => 'select', 'label' => __('Carousel Layout', 'fusion-core'), 'desc' => __('Choose to show titles on rollover image, or below image.', 'fusion-core'), 'options' => array('title_on_rollover' => __('Title on rollover', 'fusion-core'), 'title_below_image' => __('Title below image', 'fusion-core'))), 'autoplay' => array('type' => 'select', 'label' => __('Autoplay', 'fusion-core'), 'desc' => __('Choose to autoplay the carousel.', 'fusion-core'), 'options' => $reverse_choices), 'columns' => array('std' => '5', 'type' => 'select', 'label' => __('Maximum Columns', 'fusion-core'), 'desc' => __('Select the number of max columns to display.', 'fusion-core'), 'options' => fusion_shortcodes_range(6, false)), 'column_spacing' => array('std' => '13', 'type' => 'text', 'label' => __('Column Spacing', 'fusion-core'), "desc" => __("Insert the amount of spacing between items without 'px'. ex: 13.", "fusion-core")), 'scroll_items' => array('std' => '', 'type' => 'text', 'label' => __('Scroll Items', 'fusion-core'), "desc" => __("Insert the amount of items to scroll. Leave empty to scroll number of visible items.", "fusion-core")), 'show_nav' => array('type' => 'select', 'label' => __('Show Navigation', 'fusion-core'), 'desc' => __('Choose to show navigation buttons on the carousel.', 'fusion-core'), 'options' => $choices), 'mouse_scroll' => array('type' => 'select', 'label' => __('Mouse Scroll', 'fusion-core'), 'desc' => __('Choose to enable mouse drag control on the carousel.', 'fusion-core'), 'options' => $reverse_choices), 'show_cats' => array('type' => 'select', 'label' => __('Show Categories', 'fusion-core'), 'desc' => __('Choose to show or hide the categories', 'fusion-core'), 'options' => $choices), 'show_price' => array('type' => 'select', 'label' => __('Show Price', 'fusion-core'), 'desc' => __('Choose to show or hide the price', 'fusion-core'), 'options' => $choices), 'show_buttons' => array('type' => 'select', 'label' => __('Show Buttons', 'fusion-core'), 'desc' => __('Choose to show or hide the icon buttons', 'fusion-core'), 'options' => $choices), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core')), 'id' => array('std' => '', 'type' => 'text', 'label' => __('CSS ID', 'fusion-core'), 'desc' => __('Add an ID to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[products_slider picture_size="{{picture_size}}" cat_slug="{{cat_slug}}" number_posts="{{number_posts}}" carousel_layout="{{carousel_layout}}" autoplay="{{autoplay}}" columns="{{columns}}" column_spacing="{{column_spacing}}" scroll_items="{{scroll_items}}" show_nav="{{show_nav}}" mouse_scroll="{{mouse_scroll}}" show_price="{{show_price}}" show_buttons="{{show_buttons}}" class="{{class}}" id="{{id}}"]', 'popup_title' => __('Woocommerce Products Slider Shortcode', 'fusion-core'), 'no_preview' => true); /*-----------------------------------------------------------------------------------*/ /* Youtube Config /*-----------------------------------------------------------------------------------*/ $fusion_shortcodes['youtube'] = array('no_preview' => true, 'params' => array('id' => array('std' => '', 'type' => 'text', 'label' => __('Video ID', 'fusion-core'), 'desc' => __('For example the Video ID for <br />http://www.youtube.com/LOfeCR7KqUs is LOfeCR7KqUs', 'fusion-core')), 'width' => array('std' => '600', 'type' => 'text', 'label' => __('Width', 'fusion-core'), 'desc' => __('In pixels but only enter a number, ex: 600', 'fusion-core')), 'height' => array('std' => '350', 'type' => 'text', 'label' => __('Height', 'fusion-core'), 'desc' => __('In pixels but only enter a number, ex: 350', 'fusion-core')), 'autoplay' => array('type' => 'select', 'label' => __('Autoplay Video', 'fusion-core'), 'desc' => __('Set to yes to make video autoplaying', 'fusion-core'), 'options' => $reverse_choices), 'apiparams' => array('std' => '', 'type' => 'text', 'label' => __('AdditionalAPI Parameter', 'fusion-core'), 'desc' => __('Use additional API parameter, for example &rel=0 to disable related videos', 'fusion-core')), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[youtube id="{{id}}" width="{{width}}" height="{{height}}" autoplay="{{autoplay}}" api_params="{{apiparams}}" class="{{class}}"]', 'popup_title' => __('Youtube Shortcode', 'fusion-core')); /*-----------------------------------------------------------------------------------*/ /* Fusion Slider Config /*-----------------------------------------------------------------------------------*/
function admin_page() { ?> <script> function remove_sidebar_link(name,num){ answer = confirm("Are you sure you want to remove " + name + "?\nThis will remove any widgets you have assigned to this sidebar."); if(answer){ //alert('AJAX REMOVE'); remove_sidebar(name,num); }else{ return false; } } function add_sidebar_link(){ var sidebar_name = prompt("Sidebar Name:",""); //alert(sidebar_name); add_sidebar(sidebar_name); } </script> <div class="wrap"> <h2>Sidebars</h2> <br /> <table class="widefat page" id="sbg_table" style="width:600px;"> <tr> <th>Sidebar Name</th> <th>CSS class</th> <th>Remove</th> </tr> <?php $sidebars = get_sidebars(); //$sidebars = array('bob','john','mike','asdf'); if (is_array($sidebars) && !empty($sidebars)) { $cnt = 0; foreach ($sidebars as $sidebar) { $alt = $cnt % 2 == 0 ? 'alternate' : ''; ?> <tr class="<?php echo $alt; ?> "> <td><?php echo $sidebar; ?> </td> <td><?php echo name_to_class($sidebar); ?> </td> <td><a href="javascript:void(0);" onclick="return remove_sidebar_link('<?php echo $sidebar; ?> ',<?php echo $cnt + 1; ?> );" title="Remove this sidebar">remove</a></td> </tr> <?php $cnt++; } } else { ?> <tr> <td colspan="3">No Sidebars defined</td> </tr> <?php } ?> </table><br /><br /> <div class="add_sidebar"> <a href="javascript:void(0);" onclick="return add_sidebar_link()" title="Add a sidebar" class="button-primary">+ Add New Sidebar</a> </div> </div> <?php }
<?php wp_get_header(); ?> <div class="span-24" id="contentwrap"> <?php get_sidebars('left'); ?> <div class="span-14"> <div id="content"> <h2 class='pagetitle'>Error 404 - Page Not Found</h2> </div> </div> <?php get_sidebars('right'); ?> </div> <?php wp_get_footer();