Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * This code checks for a named active sidebar, then runs the appropriate template as a result
- */
- <?php get_header(); ?>
- <div class="wrap">
- <section class="entry-content">
- <?php
- // Check to see if we have an active sidebar named "Primary"
- if ( is_active_sidebar('primary')) :
- // Get the template "two-columns.php" inside of the "page-templates" folder and display its contents here
- get_template_part("page-templates/two", "columns");
- // No active sidebar?
- else :
- // Get the template "one-column.php" inside of the "page-templates" folder and display its contents here
- get_template_part("page-templates/one", "column");
- // End the conditional
- endif;
- ?>
- </section>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement