-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtwo-column.php
55 lines (50 loc) · 1.98 KB
/
two-column.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!--
Check full-width.php for more info about page templates.
Sometimes you might want a template for a different post type as well.
You might want your individual posts to be laid differently depending on the
content.
By default, a template would only be used for a page, but if you want to allow
other post types to use the a template, you can include the Template-Post-Type:
comment underneath the Template Name comment.
(I have to use a - between the words as it would then
register this comment for the post types and not the real one bellow)
This will also include a dropdown menu in the attributes section of the add/edit
sections of the post type.
The value would be a list of all the post types you want this template to be used for.
The default post types are:
Post (Post Type: 'post')
Page (Post Type: 'page')
Attachment (Post Type: 'attachment')
Revision (Post Type: 'revision')
Navigation Menu (Post Type: 'nav_menu_item')
Custom CSS (Post Type: 'custom_css')
Changesets (Post Type: 'customize_changeset')
User Data Request (Post Type: 'user_request' )
Later on we will add our own custom post types into our theme.
-->
<?php
/*
Template Name: Two column Template
Template Post Type: page, post
*/
?>
<?php get_header(); ?>
<?php if(have_posts()): ?>
<?php while(have_posts()): the_post();?>
<div class="container">
<div class="row">
<div class="col">
<h1><?= the_title(); ?></h1>
</div>
</div>
<div class="row">
<div class="col">
<div class="twoColumns">
<?php the_content(); ?>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php get_footer(); ?>