-
Notifications
You must be signed in to change notification settings - Fork 0
/
programs-page.php
79 lines (74 loc) · 2.96 KB
/
programs-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
69
70
71
72
73
74
75
76
77
78
79
<?
defined('ABSPATH') OR exit;
/**
* Template Name: Programs Template
* Description: A full-width template with no sidebar
*
* @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
?>
<main id="main-content">
<div class="super-container title-holder">
<div class="container">
<div class="sixteen columns alpha omega primary-nav-holder">
<header>
<h1><? the_title(); ?></h1>
</header><!-- access -->
</div><!-- menu-holder -->
</div>
</div>
<div class="super-container interior-page">
<div class="container">
<div class="sixteen columns alpha">
<div id="primary" class="full-width">
<div id="content">
<? the_post(); ?>
<article id="post-<? the_ID(); ?>" <? post_class(); ?> role="article">
<!--<header class="entry-header">
<h1 class="entry-title"><? the_title(); ?></h1>
</header><!- - .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<div class="dog-runner">
<?php
$args = array( 'posts_per_page' => -1,
'post_type' => 'program-info',
'orderby' => 'menu_order',
'order' => 'DESC',
);
$i=0;
$loop = new WP_Query($args);
if ($loop->have_posts()) {
echo '<ul>';
while($loop->have_posts()) : $loop->the_post();
$external_url = get_post_meta(get_the_id(), '_cmb_external_url', true);
if (!empty($external_url)) {
$the_link = '<a href="'.$external_url.'" target="_blank">';
}
else {
$the_link = '<a href="'.get_the_permalink().'">';
}
echo '<li>';
echo $the_link;
echo get_the_post_thumbnail($post->ID, 'dog', array('class' => 'dog-thumb'));
echo '</a>';
echo '</li>';
$i++;
endwhile;
wp_reset_query();
}
echo '<ul>';
?>
</div>
</article><!-- #post-<? the_ID(); ?> -->
</div><!-- #content -->
</div><!-- #primary -->
</div>
</div>
</div>
</main><!-- #main-content -->
<? get_footer(); ?>