?> <!-- Page Content --> <div class="container"> <div class="row"> <!-- Blog Entries Column --> <div class="col-md-8"> <h1 class="page-header"> Category <?php if (isset($_GET['id'])) { $category_id = $_GET['id']; $category = findCategoryById($category_id); echo "<small>" . $category['title'] . "</small>"; } ?> </h1> <!-- Blog posts --> <?php if (isset($_GET['id'])) { $category_id = $_GET['id']; $posts = getPublishedPostsWithCategory($category_id); if (count($posts) == 0) { echo "<h3>No posts for this category</h3>"; } foreach ($posts as $post) { require "includes/post_data.php";
<th class="hide">ID</th> <th class="col-xs-3">Title</th> <th>Author</th> <th>Category</th> <th class="col-xs-1">Status</th> <th>Image</th> <th class="col-xs-1">Tags</th> <th>Comments</th> <th>Date</th> </tr> </thead> <tbody> <?php $posts = getAllPosts(); foreach ($posts as $post) { $post_category = findCategoryById($post['category_id']); ?> <tr> <!-- Checkbox --> <td> <div class="checkbox"> <label> <input type="checkbox" name="bulk_posts[]" class="bulk-checkbox" value="<?php echo $post['id']; ?> "> </label> </div> </td>