This repository has been archived by the owner. It is now read-only.
Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
clas/page-square-grid-departments.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
92 lines (51 sloc)
2.77 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: Square Grid - Departments | |
*/ | |
get_header(); ?> | |
<div id="home-interior"> | |
<div class="row" id="row1"> | |
<div class="page-title clear"> | |
<h1><?php the_title(); ?></h1> | |
</div> | |
<div class="interior-hero clear"> | |
<?php the_post_thumbnail(); ?> | |
</div> | |
<div class="span12 follow-hero"> | |
<?php $args = array('category_name' => 'departments', | |
'posts_per_page' => 1000, | |
'order' => 'ASC'); | |
$posts = get_posts($args); | |
?> | |
<?php if ( !empty($posts) && isset($posts[0])) : foreach( $posts as $post ) : setup_postdata($post); ?> | |
<div class="span3 square-grid no-marg"> | |
<div class="square-grid-crop"> | |
<a href="<?php $key="square-grid-external-link";echo get_post_meta($post->ID, $key, true); ?>"> | |
<?php the_post_thumbnail('medium');?> | |
</a> | |
<?php | |
$posttags = get_the_tags(); | |
$title = get_the_title(); | |
if ($posttags) { | |
foreach($posttags as $tag) { | |
echo '<div'; | |
echo ' class="square-grid-title ' . $tag->name . '">' . '<p><a class="square-title-a" href="'. get_post_meta($post->ID, "square-grid-external-link", true).'">'. $title . '</a></p>' . '</div>'; | |
} | |
} | |
?> | |
</div> | |
<div class="square-grid-address"> | |
<?php $key="square-grid-building"; echo '<strong>'. stripslashes (wpautop( get_post_meta($post->ID, $key, true))) . '</strong>'; ?> | |
<?php $key="square-grid-address"; echo stripslashes (wpautop( get_post_meta($post->ID, $key, true))); ?> | |
</div> | |
</div> | |
<?php endforeach; ?> | |
<?php else: ?> | |
<p> | |
<?php _e('No content to load.'); ?> | |
</p> | |
<?php endif; ?> | |
</div> | |
</div> | |
</div> | |
<?php get_footer(); ?> |