forked from dailybruin/caeruleum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
loop-photoblog.php
53 lines (49 loc) · 1.98 KB
/
loop-photoblog.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
<?php echo '<link href="/css/photoblog.css?v=1365830493" rel="stylesheet" media="screen" type="text/css" />'; ?>
<div class="small-9 columns" id="post">
<?php the_post();
$cats = get_the_category();
if ($cats) {
foreach($cats as $cat){//DON'T HAVE MULTIPLE CATS OTHER THAN SPECTRUM AND THE SUBCAT
if ($cat->name != "Spectrum"){
$the_cat = $cat;
}
}
}
?>
<div class="page-header">
<a class="pb-logo" href="/category/spectrum"><img src="/img/spectrum-<?php echo($the_cat->slug) ?>.png" /></a>
<h2>Exploring the UCLA experience through photojournalism</h2>
</div><!-- end div.page-header -->
<div id="pb-gallery-block">
<div class="photoblog-text">
<h2>
<a href="/category/spectrum/<?php echo($the_cat->slug) ?>">
<?php /*echo $the_cat->name;
echo (": "); */
the_title();
?>
</a></h2>
<?php $gallery = get_post_meta($post->ID, 'gallery', true);
if ($gallery != '-1') //THIS PART DONE BY NEIL 2012
// echo do_shortcode('[nggallery id='.$gallery.' template="galleryview" images=0]');
global $nggdb;
$galleryt = $nggdb->get_gallery($gallery, 'sortorder', 'ASC', true, 0, 0);
foreach($galleryt as $image) {
echo '<div id="pb-image-block"><div id="pb-gallery-image"><img src="'.$image->imageURL.'"/></div>';
echo '<p id="pb-gallery-text">'.$image->description.' (Photo by '. $image->alttext.')</p></div>';
}
?>
<?php if(function_exists('the_audio')) the_audio(); ?>
<hr>
<?php the_content(); ?>
<p id="photoblog-post-author">Credit: <?php coauthors(); ?></p>
<p class="photoblog-sm">
<div class="fb-like" data-href="<?php echo get_permalink(); ?>" data-send="true" data-width="450" data-show-faces="true" data-colorscheme="dark"></div>
</p>
<?php wp_link_pages(array('before' => '<nav class="pagination">', 'after' => '</nav>')); ?>
</div>
</div> <!--photoblog-post-block-->
</div><!-- end div#post -->
<div class="small-3 columns">
<?php get_template_part('sidebar','photoblog'); ?>
</div>