Home Forums Add-ons Gallery Field Bring gallery image into have post array Reply To: Bring gallery image into have post array

  • Sorry elliot still your work with a novice here… still working on my PHP knowledge. Couldn’t get the print_r function to work for me either 🙁

    Thanks again for your help, the plugins you have developed are great and it’s change the way I work with and understand wordpress. Cheers

    Here is my code for the page

    Template Name: Project Template
    <?php get_template_part('templates/content', 'page'); ?>-->
    <?php get_template_part('templates/page', 'header'); ?>
     <div class="wrap container" role="document">
        <div class="content row">
    	$args = array(
    		'post_type' => 'projects',
    			'order' => 'ASC'
    	$the_apppage = new WP_Query( $args );	
    <div  class="row">
    <?php if ( have_posts() ) : while ( $the_apppage->have_posts() ) : $the_apppage->the_post(); ?>
    	<div class="col-md-4">	
    	<i class="fa fa-arrow-circle-o-right"></i>			
    		<article class="project-item web-design image">
    			<a class="imageover" href="<?php the_permalink(); ?>">			
    			<!-- Gallery Test Code Here -->	
    			<?php $images = get_field('gallery'); ?> 
    			<h1><img src="<?php echo $images[0]["url"]["thumbnail"]; ?>" ></h1>	
    			<!-- Gallery Test Code Here end -->			
    				<img class="img-responsive project-thumb" src="<?php the_field('gallery_feature_image');?>" alt="<?php the_title(); ?>"><!--Project thumb -->		
    				<div class="details">				
    					<h3 class="project-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3><!--Project Title -->
    					<small><?php the_excerpt(); ?></small><!--Project Categories -->					
    		<?php endwhile; else: ?>		
    		<p>There are no posts or pages here</p>
    	<?php endif; ?>