View difference between Paste ID: Apfnu7bt and V3w5fjJ5
SHOW: | | - or go back to the newest paste.
1
<?php /* Template Name: Home page template */ ?>
2
<?php get_header(); ?>
3
	<div id="carousel-area">
4
		<script type="text/javascript">
5
		 	jQuery(function($){
6
			$('.bxslider').bxSlider({
7
				auto: 'true',
8-
		<div id="carousel-area">
8+
				mode: 'fade'
9
			});
10-
				<script type="text/javascript">
10+
			});
11-
 			 	jQuery(function($){
11+
		</script>
12-
    				$('.bxslider').bxSlider({
12+
		<?php the_field('slider_text'); ?>
13-
  					auto: 'true',
13+
	</div>
14-
  					mode: 'fade'
14+
<!-- MAIN TEXT AREA-->
15-
					});
15+
16-
  				});
16+
17-
				</script>
17+
18
				<div id="main-text-col">
19-
				<?php the_field('slider_text'); ?>
19+
20
				
21
					<div class="news-head">News</div>
22
					
23
					<div class="post-excerpt-text">
24
						<?php if ( have_posts() ): ?>
25
							<ol>
26-
			<!-- MAIN TEXT AREA-->
26+
							<?php while ( have_posts() ) : the_post(); ?>
27
								<li>
28
									<div class="article">
29
										
30
										<div class="excerpt_image">
31
											<?php if(get_field('excerpt_image')): ?>
32
												<?php
33-
						
33+
												$attachment_id = get_field('excerpt_image');
34-
						
34+
												$size = "thumbnail"; // (thumbnail, medium, large, full or custom size)
35
												$image = wp_get_attachment_image_src( $attachment_id, $size );
36-
					<div class="news-head">
36+
												?>
37
												<img src="<?php echo $image[0]; ?>" />
38-
						News
38+
											<?php endif; ?>
39-
						
39+
										</div>				
40
										
41
										<h3><a href="<?php esc_url( the_permalink() ); ?>" title="Permalink to <?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
42
										
43
										<?php the_excerpt(); ?>
44-
						
44+
									</div>
45-
						<?php
45+
								</li>
46-
							$excerpts = new WP_Query( array(
46+
							<?php endwhile; ?>
47-
    						'post_type' => 'post',
47+
							</ol>
48-
    						'post_status' => 'publish',
48+
							<?php else: ?>
49-
    						'posts_per_page' => 3
49+
							<h1>No Posts to display.</h1>
50-
							) );
50+
						<?php endif; ?>
51
					</div>
52-
							if ( $excerpts->have_posts() ) :
52+
53-
						?>
53+
54-
						<?php
54+
55-
							    while ( $excerpts->have_posts() ) : $excerpts->the_post();
55+
56-
						?><h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3><?php the_excerpt(); ?>
56+
57-
						<?php
57+
58-
							    endwhile;
58+
59-
							    wp_reset_postdata();
59+
60-
						?>
60+
61-
						<?php
61+
62-
							endif;
62+
63-
						?>
63+
64
				</div>
65
				
66
				
67
				
68
			
69
			</div>
70
			
71
			<?php get_footer(); ?>