Exemple #1
0
<?php

/*
Peek Theme
-------------
front-gallery.php
Template - Front page gallery
*/
// Vars
$peek_thumbnail_style = 'height-gallery-thumbnail';
$peek_large_style = 'large';
// built-in style
$peek_full_style = 'full';
// built-in style
$gallery_id = peek_front_gallery();
if ($gallery_id) {
    $args = array('post_type' => 'gallery', 'post_status' => 'publish', 'p' => $gallery_id, 'posts_per_page' => 1);
    $gallery_query = new WP_Query($args);
    $gllr_options = get_option('gllr_options');
    if ($gallery_query->have_posts()) {
        ?>

	<div id="gallery-splash">

	<?php 
        while ($gallery_query->have_posts()) {
            $gallery_query->the_post();
            $images_id = get_post_meta($post->ID, '_gallery_images', true);
            // image query
            $image_args = array("showposts" => -1, "what_to_show" => "posts", "post_status" => "inherit", "post_type" => "attachment", "orderby" => $gllr_options['order_by'], "order" => $gllr_options['order'], "post_mime_type" => "image/jpeg,image/gif,image/jpg,image/png", 'post__in' => explode(',', $images_id), 'meta_key' => '_gallery_order_' . $post->ID);
            $image_query = new WP_Query($image_args);
Exemple #2
0
Header template file
*/
// get featured image
$featured_image = peek_featured_image();
// build the body class array
$body_class = array();
if (is_front_page()) {
    $body_class[] = 'front';
}
if (is_admin_bar_showing()) {
    $body_class[] = 'admin-bar';
}
if ($featured_image) {
    $body_class[] = 'splash';
} else {
    if (peek_front_gallery() && is_front_page()) {
        $body_class[] = 'splash';
    } else {
        $body_class[] = 'no-splash';
    }
}
?>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="<?php 
bloginfo('charset');
?>
" />

		<title><?php