<?php /* T-MMM-emplate Name: Full Page Slider */ gp_add_html_class('horizontal-page no-scroll'); if (have_posts()) { the_post(); $slides = gp_slider_get_published_slides($post->ID); $slides = apply_filters('gp_before_slider', $slides); $options = gp_slider_get_options($post->ID); $slider_attr = array(); if ($options['slideshow']) { $slider_attr['data-slideshow'] = '1'; $slider_attr['data-duration'] = $options['slideshow_interval']; } if (!is_front_page() && $slides && $slides[0]) { global $gp_theme; $data = gp_slider_get_slide_data($slides[0]->ID); $gp_theme->set_image($data['image']); $gp_theme->set_description($data['description']); } get_header(); if ($slides) { ?> <div id="main" class="site"> <a href="#" class="slider-arrow-left"><?php _e('Previous', 'gp'); ?>
/** * The template for displaying 404 pages (Not Found). * * @package gp * @since gp 1.0 */ gp_add_html_class('horizontal-page no-scroll'); get_header(); /** * Find pages that have full page slider template. Search those pages for big images. */ $slider_pages = it_find_page_by_template('template-full-page-slider.php', 'post_status=publish'); $image = false; foreach ($slider_pages as $slider_page) { $slides = gp_slider_get_published_slides($slider_page->ID); if ($slides && is_array($slides)) { shuffle($slides); foreach ($slides as $slide) { $image = wp_get_attachment_image_src($slide->ID, 'gp-max'); // We found our first image! if ($image) { $image = $image[0]; $data = gp_slider_get_slide_data($slide->ID); break; } } } // Stop as soon as we find first image. if ($image) { break;