Skip to content

Instantly share code, notes, and snippets.

@eleyasbd
Forked from kamalinfo/Header and blog style
Created January 30, 2018 03:50
Show Gist options
  • Save eleyasbd/d63d83378772ad2ecceb90dec23fd30a to your computer and use it in GitHub Desktop.
Save eleyasbd/d63d83378772ad2ecceb90dec23fd30a to your computer and use it in GitHub Desktop.
<?php
//another page another header style
$menu_style_meatbox = get_post_meta(get_the_id(),'_ThemeName_page_menu_style',true);
$menu_style_theme_option = $ThemeName_opt ['ThemeName_header_layout'];
if( $menu_style_meatbox!='none'){
$menu_style_theme_option = $menu_style_meatbox;
}
switch( $menu_style_theme_option ){
case 2:
get_template_part('/inc/header/header-2');
break;
case 3:
get_template_part('/inc/header/header-3');
break;
case 4:
get_template_part('/inc/header/header-4');
break;
default:
get_template_part('/inc/header/header-1');
}
//blog style
if( isset ( $ately_opt['themename_sidebarblog_pos'] ) ){
$themename_blog_layout_opts = $themename_opt['themename_sidebarblog_pos'];
}
if(isset($_GET['layout'])){
switch (htmlspecialchars($_GET['layout'])) {
case 'twocolumn':
$themename_blog_layout_opts = 'twocolumn';
break;
case 'threecolumn':
$themename_blog_layout_opts = 'threecolumn';
break;
case 'left_sidebar':
$themename_blog_layout_opts = 'left';
break;
case 'right_sidebar':
$themename_blog_layout_opts = 'right';
break;
default:
$themename_blog_layout_opts = 'single';
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment