Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Re: Issue #88 adds default static front page layout option

  • Loading branch information...
commit c9ddbd31065d39c754c6687e4aa3e5c98c62b12c 1 parent 41651fa
Chip Bennett authored
Showing with 34 additions and 0 deletions.
  1. +7 −0 functions/custom.php
  2. +27 −0 functions/options.php
7 functions/custom.php
View
@@ -103,6 +103,13 @@ function oenology_get_current_page_layout() {
if ( is_attachment() ) {
$layout .= 'attachment';
}
+ else if ( is_front_page() && ! is_home() ) {
+ if ( 'default' == $custom_layout ) {
+ $layout .= $oenology_options['default_front_page_layout'];
+ } else {
+ $layout .= $custom_layout;
+ }
+ }
else if ( is_page() ) {
if ( 'default' == $custom_layout ) {
$layout .= $oenology_options['default_static_page_layout'];
27 functions/options.php
View
@@ -494,6 +494,33 @@ function oenology_get_option_parameters() {
'since' => '2.3',
'default' => 'two-column-left'
),
+ 'default_front_page_layout' => array(
+ 'name' => 'default_front_page_layout',
+ 'title' => __( 'Default Static Front Page Layout', 'oenology' ),
+ 'type' => 'radio',
+ 'valid_options' => array(
+ 'one-column' => array(
+ 'name' => 'one-column',
+ 'title' => __( '1-Column', 'oenology' ),
+ 'description' => __( 'One column (full-width content)', 'oenology' )
+ ),
+ 'two-column' => array(
+ 'name' => 'two-column',
+ 'title' => __( '2-Column', 'oenology' ),
+ 'description' => __( 'Two columns (menu on left, content on right)', 'oenology' )
+ ),
+ 'three-column' => array(
+ 'name' => 'three-column',
+ 'title' => __( '3-Column', 'oenology' ),
+ 'description' => __( 'Three columns (menu on left, sidebar on right, content in the center)', 'oenology' )
+ ),
+ ),
+ 'description' => __( 'Select the layout to be used as the default for a static front page.', 'oenology' ),
+ 'section' => 'default_layouts',
+ 'tab' => 'layout',
+ 'since' => '3.0',
+ 'default' => 'one-column'
+ ),
'static_page_submenu_display' => array(
'name' => 'static_page_submenu_display',
'title' => __( 'Static Page Submenu Display', 'oenology' ),
Please sign in to comment.
Something went wrong with that request. Please try again.