Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * Template Name: Team
- * Description: A Page Template with a darker design.
- */
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>Power In A Box</title>
- <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/Navigation/navBarStylePage.css" media="screen" type="text/css" />
- <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/Team/style.css" media="screen" type="text/css" />
- </head>
- <body>
- <div id="windowHeight">
- <div id="windowWidth">
- <div id="page">
- <img id="pageImg" src="<?php bloginfo('template_directory'); ?>/Navigation/pageBGcopy.png" />
- <?php include("$_SERVER[DOCUMENT_ROOT]/powerbox/wp-content/themes/powerbox/Navigation/header.php");?>
- <div id="PersonBio">jnjnjnjnjn</div>
- <div id="mainTextTitle"></div>
- <div id="mainText">
- <ul class="faces">
- <?php
- $categories = get_categories();
- foreach ( $categories as $category ) {
- $i = -1;
- echo '<div class="grid-row"><h2>' . $category->name . '</h2></div>';
- $args = array( 'posts_per_page' => -1, 'cat' => $category->term_id );
- $cat_posts = new WP_Query($args);
- if ( $cat_posts->have_posts() ) : while ( $cat_posts->have_posts() ) :
- $i++;
- $cat_posts->the_post();
- $face = get_field( 'face' );
- $name = get_field( 'fullname' );
- if ( $i % 6 == 0 ) echo '<div class="grid-row">';
- echo '<div class="obj" data-id="' . get_the_ID() . '">';
- echo '<div class="faceThumb">';
- echo wp_get_attachment_image($face);
- echo '</div><div class="name">' . $name . '</div></div>';
- if ( ($i % 6 == 5) || $i == ($cat_posts->post_count - 1) ) echo '</div>';
- endwhile; endif;
- }
- wp_reset_postdata();
- ?>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement