Skip to content

Instantly share code, notes, and snippets.

Created April 10, 2013 18:13
Show Gist options
  • Save anonymous/5357065 to your computer and use it in GitHub Desktop.
Save anonymous/5357065 to your computer and use it in GitHub Desktop.
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package electec
*/
get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php
$slides = pods('slider');
$slides->find('name ASC');
$total_slides = $slides->getTotalRows();
?>
<div class="flexslider">
<ul class="slides">
<?php if( $total_slides > 0 ) : ?>
<?php while ( $slides->fetch() ) : ?>
<?php
// set our variables
$permalink= $slides->field('permalink');
$title=$slides->field('name');
$tagline= $slides->field('tagline');
$link_to= $slides->field('link_to');
$pic1 = $slides->field('image.guid');
?>
<li>
<img src="<?php echo $pic1;?>"/>
<div class="slide-title">
<h2><a href="<?php echo $link_to; ?>"><?php echo $title;?></a> </h2>
<?php echo $tagline;?>
</div>
</li>
<?php
endwhile;
endif;
?>
</ul>
</div>
<!-- Start Clients -->
<h1> Our Clients</h1>
<?php
$params = array(
'orderby' => 't.name',
'where'=> 't.featured = 1'
);
$logos = pods( 'client_logos', $params );
$total_logos = $logos->getTotalRows();
?>
<div id="featured-clients">
<?php if( $total_logos > 0 ) : ?>
<?php while ( $logos->fetch() ) : ?>
<?php
// set our variables
$name= $logos->field('name');
$permalink= $logos->field('permalink');
$pic1 = $logos->field('logo.guid');
?>
<div id="<?php echo $permalink; ?>">
<img src="<?php echo $pic1; ?>"/>
</div>
<?php
endwhile;
endif;
?>
</div>
<!-- Start Featured Solutions -->
<div id="featsolutions">
<h1> Featured Solutions </h1>
<?php $my_query = new WP_Query('p=23');
  while ($my_query->have_posts()) : $my_query->the_post();
  ?>
<?php the_excerpt();?>
  <?php endwhile; ?>
</div><!-- #featsolutions -->
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment