HEX
Server: Apache
System: Linux p3plzcpnl489499.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: dwauav0tm6jp (6177017)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/dwauav0tm6jp/hosted/jeffreyjhart_com/wp-content/themes/skylab-old/page-slider.php
<?php
/**
 * Template Name: Slider
 * Description: A Page Template that adds a slider to pages
 *
 * @package WordPress
 * @subpackage Skylab
 * @since Skylab 1.0
 */

get_header(); ?>

	<div id="main" class="clearfix">

		<div id="primary">
			<div id="content" role="main">	
				<header class="entry-header">
					<h1 class="entry-title"><?php echo the_title();?></h1>
				</header><!-- .entry-header -->
				
				<?php if ( post_password_required() ) : ?>
					<div class="password-protected">
						<?php the_content(); ?>
					</div>
				<?php else : ?>
						
					<?php								
					global $post;

					if ( metadata_exists( 'post', $post->ID, '_page_image_gallery' ) ) {
						$page_image_gallery = get_post_meta( $post->ID, '_page_image_gallery', true );
					} else {
						// Backwards compat
						$attachment_ids = array_filter( array_diff( get_posts( 'post_parent=' . $post->ID . '&numberposts=-1&post_type=attachment&orderby=menu_order&order=ASC&post_mime_type=image&fields=ids' ), array( get_post_thumbnail_id() ) ) );
						$page_image_gallery = implode( ',', $attachment_ids );
					}
								
					$attachments = array_filter( explode( ',', $page_image_gallery ) );
					$thumbs = array();
					if ( $attachments ) { ?>
						<div id="gallery-slider" class="royalSlider rsMinW clearfix">
							<?php foreach ( $attachments as $attachment_id ) { ?>
								<div class="rsContent" data-attachment_id="<?php echo $attachment_id; ?>">
									<?php $gallery_image_src = wp_get_attachment_image_src( $attachment_id, 'full' ); ?>
									<?php $gallery_image_thumb = wp_get_attachment_image_src( $attachment_id, 'thumbnail' ); ?>
									<?php $attachment = get_post( $attachment_id ); ?>
									<?php $attachment_title = apply_filters( 'the_title', $attachment->post_title ); ?>
									<?php $attachment_caption = apply_filters( 'the_title', $attachment->post_excerpt ); ?>
									<img class="rsImg" src="<?php echo $gallery_image_src[0]; ?>" width="<?php echo $gallery_image_src[1]; ?>" height="<?php echo $gallery_image_src[2]; ?>" alt="<?php echo $attachment_title; ?>" data-rsTmb="<?php echo $gallery_image_thumb[0]; ?>" />
									<?php if ( ! empty( $attachment_caption ) ) { ?>
										<span class="rsTitle rsABlock rsNoDrag rsAbsoluteEl" data-fade-effect="true" data-move-offset="0" data-move-effect="right" data-speed="350"><?php echo $attachment_caption; ?></span>
									<?php } ?>
								</div>
							<?php } ?>
						</div><!-- #gallery-slider -->
									
					<?php } else { ?>
						<p class="no-found"><?php _e( 'No images found, please add some images.', 'mega' ); ?></p>
					<?php } // end if ( $attachments ) ?>
						
				<?php endif; // end if ( post_password_required() ?>
			</div><!-- #content -->
		</div><!-- #primary -->
	
<?php get_footer(); ?>