-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcougar-updates-page.php
68 lines (61 loc) · 3.36 KB
/
cougar-updates-page.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
<?php
defined('ABSPATH') OR exit;
/**
* Template Name: Cougar Updates Page
*
* @package WordPress
* @subpackage WP-Skeleton
*/
get_header();
get_template_part( 'sub-header', 'index' ); //the header stuffs
get_template_part( 'menu', 'index' ); //the menu + logo/site title
?>
<div class="super-container interior-page">
<div class="container">
<div class="sixteen columns alpha">
<div id="primary" class="full-width">
<main class="content" id="main-content">
<?php the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> role="article">
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<?php
$args = array(
'posts_per_page' => -1,
'post_type' => 'cougar-corner',
'order' => 'DESC',
'orderby' => 'date',
);
$loop = new WP_Query($args);
//news feed goes here, use inc var to label each, need to ensure gap integrity on individual boxes.
if ($loop->have_posts()) { ?><?
while ($loop->have_posts()) : $loop->the_post();
$news_excerpt = mstar_custom_excerpt($words = 10, $link_text = 'read more', $allowed_tags = '', $smileys = 'no', $link = '', $echo = false);
$allowed_tags = '<a>,<i>,<em>,<b>,<span>';
$news_excerpt = preg_replace('/\[.*\]/', '', strip_tags($news_excerpt, $allowed_tags));
$post_date = get_the_date( 'F j, Y' ); ?>
<div class="update-feed-item col<? echo $i; ?>">
<div class="update-excerpt">
<a href="<? echo get_permalink(); ?>">
<h3 class="update-title"><? the_title(); ?></h3>
</a>
<p class="update-date"><? echo get_the_time('F jS, Y'); ?></p>
<? mstar_custom_excerpt($words = 30, $link_text = 'read more', $allowed_tags = '', $smileys = 'no', $link = '' ); ?>
</div>
</div> <?
$i++;
endwhile;
wp_reset_query();
}
?>
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->
</main><!-- #content -->
</div><!-- #primary -->
</div>
</div>
</div>
<? get_footer(); ?>