This repository has been archived by the owner on Dec 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
your-news.php
149 lines (132 loc) · 5.38 KB
/
your-news.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php
/**
* Template Name: your-news
* Description: Displays all posts
*/
get_header(); ?>
<head>
<link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_directory_uri(). '/style.css' ?>">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="University Radio Nottingham is the multi-award–winning university radio station of the University of Nottingham Students’ Union.">
<meta name="author" content="">
<title>URN MAIN SITE</title>
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(). '/vendor/fontawesome-free/css/all.min.css' ?>">
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(). '/vendor/bootstrap/css/bootstrap.min.css' ?>">
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(). '/scss/urnportal.scss' ?>">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i' ?>">
</head>
<!-- Page Content -->
<?php if(have_posts()) : while(have_posts()) : the_post();?>
<?php endwhile; else: endif;?>
<?php
$args = array(
'post_type' => 'post',
'category_name' => 'Article'
);
$_posts = new WP_Query($args);
?>
<div class="row justify-content-center">
<h1 class="entry-title">YOUR NEWS</h1>
</div>
<div class="container">
<div class="row">
<!-- Blog Entries Column -->
<div class="col-md-8">
<h1 class="my-4">
<small></small>
</h1>
<!-- Blog Post -->
<?php if($_posts->have_posts()):?>
<?php while ($_posts->have_posts()): $_posts->the_post();?>
<div class="card mb-4">
<h1 class="my-4" id="remove-overflow">
<?php the_title();?>
</h1>
<img class="card-img-top" src="<?php the_post_thumbnail_url('thumb_image');?>" alt="Card image cap">
<div class="card-body">
<h2 class="card-title" >Post Title</h2>
<p class="card-text"><?php the_excerpt()?></p>
<a href="<?php the_permalink();?>" class="btn btn-primary">Read More →</a>
</div>
<div class="card-footer text-muted"> Posted on <?php echo get_the_date();?>
<a href="#">Written by <?php echo get_the_author(); ?></a>
</div>
</div>
<?php endwhile;?>
<?php endif;?>
<!-- Pagination -->
<ul class="pagination justify-content-center mb-4">
<li class="page-item">
<a class="page-link" href="#">← Older</a>
</li>
<li class="page-item disabled">
<a class="page-link" href="#">Newer →</a>
</li>
</ul>
</div>
<!-- Sidebar Widgets Column -->
<div class="col-md-4">
<!-- Search Widget
<div class="card my-4">
<h5 class="card-header">Search</h5>
<div class="card-body">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for...">
<span class="input-group-append">
<button class="btn btn-secondary" type="button">Go!</button>
</span>
</div>
</div>
</div>-->
<!-- Categories Widget -->
<div class="sticky-top">
<div class="card my-4">
<h5 class="card-header" id="news-card-title">Check out our Monthly Discounts</h5>
<div class="card-body"id="news-card-body">
<div class="row">
<div class="col-lg-6">
<ul class="list-unstyled mb-0">
<li>
<a href="#">Web Design</a>
</li>
<li>
<a href="#">HTML</a>
</li>
<li>
<a href="#">Freebies</a>
</li>
</ul>
</div>
<div class="col-lg-6">
<ul class="list-unstyled mb-0">
<li>
<a href="#">JavaScript</a>
</li>
<li>
<a href="#">CSS</a>
</li>
<li>
<a href="#">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Side Widget -->
<div class="card my-4">
<h5 class="card-header" id="news-card-title2">Want to write articles?</h5>
<div class="card-body" id="news-card-body">
<p> You can put anything you want inside of these side widgets. They are easy to use, and feature the new Bootstrap 4 card containers!</p>
<a href="<?php echo site_url('/host-a-show'); ?>"> <button type="button" class="btn btn-primary" id="listen-again" >Learn More</button></a>
</div>
</div>
</div>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
<?php get_footer(); ?>