Whats wrong? Just a plain page :(

[php]<?php get_header(); ?>

<!-- main body -->
<div class="pb-page-body">
	<div class="container">
		<div class="row">
			<div class="col-md-9">

				<?php 
		        if(have_posts()): while(have_posts()): the_post(); 
		        ?>

		        
				<a href="<?= get_site_url() ?>/contact-us" class="pb-page-cta-banner-pink">
				</a>

				<script>
					<?php 
					/* 
					this might be a crazy way to do it, 
					but I dont want to break content loops on some pages. 
					*/ ?>
					$('.pb-page-cta-banner-pink').load('<?= get_site_url() ?>/pink-banner-ajax');
				</script>

				<!-- headers -->
				<div class="pb-page-body-header">
					<h1 class="pb-blue"><?= the_title() ?></h1>
					<h2><span class="pb-pink"><?= types_render_field("booth-price", array('output'=>'raw')); ?></span> <span class="pb-blue">for <?= types_render_field("booth-time", array('output'=>'raw')) ?></span></h2>
				</div>

				<?php
				$feature_map = array(
					'instant print' => 'instant-print',
					'video messaging' => 'video-messaging',
					'wind machine' => 'wind-machine',
					'hd camera' => 'hd-camera',
					'photo attendent' => 'photo-attendent',
					'touch screen' => 'touch-screen',
					'photo props' => 'photo-props',
					'photo book' => 'photo-book',
					'green screen' => 'green-screen'
					);

				$booth_features = types_render_field("booth-features", array('output'=>'raw'));
				$booth_features = explode(',', $booth_features);
				?>

				<div class="pb-page-body-subheader">
				<?= sizeof($booth_features) ?> features included with <?= the_title() ?>:
				</div>

				<div class="pb-page-booth-feature-icons">
					<?php
					
					$booth_features = array_map('trim', $booth_features);
					if(strlen(types_render_field("booth-features", array('output'=>'raw'))) > 0) {
						foreach($booth_features as $b_feature) { ?>
							<img class="animated flipInX" src="<?php bloginfo('template_directory'); ?>/images/feature-icons/<?= $feature_map[strtolower($b_feature)] ?>.jpg">
						<?php
						}
					}
					?>
				
				</div>







<img class=“pb-page-booth-im” src="<?= types_render_field("booth-image", array('output'=>'raw')); ?>">


<iframe class=“pb-page-video” width=“854” height=“295” src=“https://www.youtube.com/embed/<?= explode('=', types_render_field("booth-youtube-video", array('output'=>'raw')))[1]; ?>” frameborder=“0” allowfullscreen>

				<br><br>
				<div class="pb-page-body-subheader">
				Photo Booth
				</div>
				<div class="pb-page-body-content">

					<!-- text description -->
					<?php
			        the_content();
			        endwhile; endif; 
			        ?>

			    </div>
			    <br>
		        <div class="pb-page-body-subheader">
				What's Included
				</div>
				<div class="pb-page-body-content">
					<?= types_render_field("booth-what-s-included", array('output'=>'raw')); ?>

				</div>
				<div class="pb-page-body-subheader">
				Optional Extras
				</div>
				<div class="pb-page-body-content">
					<?= types_render_field("optional-extras", array('output'=>'raw')); ?>
					<br>
					<br><br>
					<!-- tabbed area -->
					<!-- <div class="pb-page-booth-tab-container">


						<a href="javascript://" data-pbtab="1" class="pb-page-booth-tab active">What's Included</a><a data-pbtab="2" href="javascript://" class="pb-page-booth-tab">Price</a><a data-pbtab="3" href="javascript://" class="pb-page-booth-tab">Event package</a>

						<div class="pb-page-booth-tab-body active" data-pbtab="1">
							<?= types_render_field("booth-what-s-included", array('output'=>'raw')); ?>
						</div>

						<div class="pb-page-booth-tab-body" data-pbtab="2">
							Costs <?= types_render_field("booth-price", array('output'=>'raw')); ?> for <?= types_render_field("booth-time", array('output'=>'raw')); ?>.
						</div>

						<div class="pb-page-booth-tab-body" data-pbtab="3">
							<?= types_render_field("booth-event-package", array('output'=>'raw')); ?>
						</div>
					</div>

–>

					<!-- <div class="pb-page-gallery">
						<div class="pb-page-body-subheader">
						Gallery
						</div>

						<?php
						$gallery_images = explode(' ', types_render_field("booth-gallery", array('output'=>'raw'))); 

						foreach($gallery_images as $im_url) {
						?>
						<a rel="gallery-1" href="<?= $im_url ?>" class="swipebox">
							<img class="booth-gallery" src="<?= $im_url ?>" alt="image">
						</a>
						<?php } ?>

					
					</div> -->
					
				</div>

				<!-- JavaScript to handle the tabz -->
				<script type="text/javascript">
				$('.pb-page-booth-tab').click(function() {
					var tab_num = $(this).attr('data-pbtab');
					$('.pb-page-booth-tab').each(function() {
						$(this).removeClass('active');
					});
					$(this).addClass('active');
					$('.pb-page-booth-tab-body').each(function() {
						if($(this).attr('data-pbtab') == tab_num)
						{
							$(this).addClass('active');
						} else {
							$(this).removeClass('active');
						}
					});
				});
				</script>

			</div>

			<!-- order booth and related items -->
			<div class="col-md-3 hidden-sm hidden-xs">
				<div class="pb-fixed-wrap">
				<!-- order booth -->
				<div class="pb-fixed-order-block" data-100="margin-top:0px" data-500="margin-top:-40px">
					<div class="pb-page-body-subheader">
					Order your Photo Booth
					</div>
					<a href="tel:08001933333" class="btn btn-default btn-lg full-width order-btn"><img src="<?php bloginfo('template_directory'); ?>/images/phone-icon.png"> CALL 0800 193 3333</a>
					<a href="<?= get_site_url() ?>/book-now/#booth=<?= the_title() ?>" class="btn btn-primary btn-lg full-width order-btn"><img src="<?php bloginfo('template_directory'); ?>/images/mail-icon.png"> BOOK NOW</a>
					<a href="<?= get_site_url() ?>/contact" class="btn btn-white btn-lg full-width order-btn"><img src="<?php bloginfo('template_directory'); ?>/images/enquiry-icon.png"> ENQUIRY FORM</a>
				</div>

				<!-- related items -->
				<div class="pb-fixed-related-block hidden-sm hidden-xs" data-100="margin-top:350px" data-500="margin-top:310px">
<?php $loop = new WP_Query( array( 'post_type' => 'photo-booth', 'posts_per_page' => 100, 'orderby' => array('meta_value' => 'ASC'), 'meta_key' => 'wpcf-booth-price' ) ); //$loop = new WP_Query( array( 'post_type' => 'photo-booth', 'posts_per_page' => 100 ) ); $curnum = 0; while ( $loop->have_posts() ) : $loop->the_post(); $curnum = $curnum + 1; ?>
					 	<a href="<?php echo get_permalink(); ?>" class="row pb-fixed-related-item">
							<div class="col-xs-4 text-center">
								<img class="pb-fixed-related-im" src="<?= types_render_field("booth-image", array('output'=>'raw')); ?>">
							</div>
							<div class="col-xs-6 pb-fixed-related-desc-container">
								<p class="pb-blue pb-fixed-related-desc"><?= the_title() ?></p>
								<p class="pb-pink pb-fixed-related-desc"><?= types_render_field("booth-price", array('output'=>'raw')); ?></p>
							</div>
					  
							<div class="col-xs-2">
								<img class="pb-blue pb-fixed-related-chevron" src="<?php bloginfo('template_directory'); ?>/images/blue-chevron.png">
							</div>
						</a>


					<?php 
					endwhile; ?>
					

				</div>

				</div>
			</div>
		</div>
	</div>

</div>


<div class="booth-bottom-bar visible-sm visible-xs">
	<div class="row">
		<div class="col-xs-3">
			 <a href="tel: 0800 193 3333" class="btn btn-default full-width"><img src="<?= get_site_url() ?>/wp-content/themes/pictureblast/images/phone-icon.png" height="15"></a>
		</div>
		<div class="col-xs-9">
			 <a href="<?= get_site_url() ?>/contact-us"  class="btn btn-primary full-width">Enquire Now</a>
		</div>
	</div>

</div>
<?php $loop = new WP_Query( array( 'post_type' => 'photo-booth', 'posts_per_page' => 100, 'orderby' => array('meta_value' => 'ASC'), 'meta_key' => 'wpcf-booth-price' ) ); //$loop = new WP_Query( array( 'post_type' => 'photo-booth', 'posts_per_page' => 100 ) ); $curnum = 0; while ( $loop->have_posts() ) : $loop->the_post(); $curnum = $curnum + 1; ?>
					 	<a href="<?php echo get_permalink(); ?>" class="row pb-fixed-related-item">
							<div class="col-xs-4 text-center">
								<img class="pb-fixed-related-im" src="<?= types_render_field("booth-image", array('output'=>'raw')); ?>">
							</div>
							<div class="col-xs-6 pb-fixed-related-desc-container">
								<p class="pb-blue pb-fixed-related-desc"><?= the_title() ?></p>
								<p class="pb-pink pb-fixed-related-desc"><?= types_render_field("booth-price", array('output'=>'raw')); ?></p>
							</div>
.pb-page-body-content img { max-width: 100%; height: auto; } @media (min-width : 450px) { .pb-page-body-content img { max-width: 50%; height: auto; } } <?php get_footer(); ?>

[/php]

It helps when we actually get a question and not just a code dump.

Sorry

It was working this morning and now the code is not, it shows a blank page, something is wring with this cide.

Thanks

That’s not exactly what he meant…

This is a help forum for people who want to get help learning PHP, so a person should show where in the code the problem might be. Only show that portion (I know for one I don’t want to go through the entire script and if a person doesn’t give the right part trust me we’ll ask for it. ;)), even though a person might know what the problem is that person should know a little about PHP and show some effort themselves in wanting to learn. Give as much detail what the problem is, instead of it doesn’t work or it used to work. I know I am sounding rude, but the truth is the best policy in my book.

First thing I suggest is adding this to the top of the page,

[php]error_reporting(E_ALL);
ini_set(‘display_errors’, 1);[/php]

Astonicipher:

apologies for hijacking, but if the above is set in php.ini am i right thinking it does not need to be declared in php script?

(my question is not related to this topic, i run LAMP in VM, configured all by myself and google almighty, hence the question)

Correct. On a development servers you want the errors to show, and want it set in the ini. Production, you want errors storing to a log.

Thanks a lot.

Sponsor our Newsletter | Privacy Policy | Terms of Service