Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 23rd, 2013  |  syntax: None  |  size: 0.96 KB  |  views: 67  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. if( is_blog() ){
  3.    return get_template_part("template-blog", "blog");
  4. } else if( is_portfolio() ){
  5.    return get_template_part("template-portfolio", "portfolio");
  6. }
  7.  
  8. do_action('set_post_id'); // set post id for extra plugins
  9. $options = get_post_meta($post->ID, '_post_options', true);
  10. $sidebar = @$options["sidebar"];
  11.  
  12. get_header();
  13. echo get_theme_generator('page_top', $options);
  14. ?>
  15. <div id="content">
  16.    <div class="inner<?php if($sidebar =='right'){ echo ' sidebar-right'; } else if( $sidebar == 'left'){ echo ' sidebar-left';} ?>">
  17.       <div id="main">
  18.       <?php
  19.          if ( have_posts() ) : the_post();
  20.             the_content();
  21.             if ( get_theme_option("advanced", "comment_page") == "on" ) { comments_template( '', true ); }
  22.          endif;
  23.       ?>
  24.       </div>
  25.       <?php if($sidebar == 'left' || $sidebar == 'right'){ get_sidebar(); } ?>
  26.       <?php echo("Sidebar is " . $sidebar) ?>
  27.    </div>
  28. </div>
  29. <?php get_footer(); ?>
clone this paste RAW Paste Data