SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | ||
3 | /** | |
4 | * This code checks for a named active sidebar, then runs the appropriate template as a result | |
5 | */ | |
6 | ||
7 | <?php get_header(); ?> | |
8 | <div class="wrap"> | |
9 | <section class="entry-content"> | |
10 | ||
11 | <?php | |
12 | ||
13 | - | // Check to see if we have an active sidebar named "Primary" |
13 | + | // Check to see if we have an active sidebar named "Primary" |
14 | if ( is_active_sidebar('primary')) : | |
15 | ||
16 | - | // Get the template "two-columns.php" inside of the "page-templates" folder and display its contents here |
16 | + | // Get the template "two-columns.php" inside of the "page-templates" folder and display its contents here |
17 | ||
18 | get_template_part("page-templates/two", "columns"); | |
19 | ||
20 | - | // No active sidebar? |
20 | + | // No active sidebar? |
21 | else : | |
22 | ||
23 | - | // Get the template "one-column.php" inside of the "page-templates" folder and display its contents here |
23 | + | // Get the template "one-column.php" inside of the "page-templates" folder and display its contents here |
24 | get_template_part("page-templates/one", "column"); | |
25 | ||
26 | - | // End the conditional |
26 | + | // End the conditional |
27 | endif; | |
28 | ||
29 | ?> | |
30 | ||
31 | </section> | |
32 | </div> | |
33 | ||
34 | <?php get_footer(); ?> |