Support

Account

Forum Replies Created

  • Hi James, Thanks but this shows the post I want to do the opposite but if set the value to 0 or null I get nothing as the field doesn’t have anything set in the field. I though the best way to fix this would be show everything that not a 1 with a !=. Do you think I’m on the right track?

  • Ok this is what I get out after add that code

    Array
    (
        [0] => Array
            (
                [id] => 49
                [alt] => 
                [title] => exet2
                [caption] => 
                [description] => 
                [mime_type] => image/jpeg
                [url] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet2.jpg
                [width] => 1280
                [height] => 905
                [sizes] => Array
                    (
                        [thumbnail] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet2-150x150.jpg
                        [thumbnail-width] => 150
                        [thumbnail-height] => 150
                        [medium] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet2-300x212.jpg
                        [medium-width] => 300
                        [medium-height] => 212
                        [large] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet2-1024x724.jpg
                        [large-width] => 1024
                        [large-height] => 724
                    )
    
            )
    
        [1] => Array
            (
                [id] => 50
                [alt] => 
                [title] => exet1
                [caption] => 
                [description] => 
                [mime_type] => image/jpeg
                [url] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet1.jpg
                [width] => 1280
                [height] => 905
                [sizes] => Array
                    (
                        [thumbnail] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet1-150x150.jpg
                        [thumbnail-width] => 150
                        [thumbnail-height] => 150
                        [medium] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet1-300x212.jpg
                        [medium-width] => 300
                        [medium-height] => 212
                        [large] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet1-1024x724.jpg
                        [large-width] => 1024
                        [large-height] => 724
                    )
    
            )
    
        [2] => Array
            (
                [id] => 51
                [alt] => 
                [title] => exet3
                [caption] => 
                [description] => 
                [mime_type] => image/jpeg
                [url] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet3.jpg
                [width] => 1280
                [height] => 882
                [sizes] => Array
                    (
                        [thumbnail] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet3-150x150.jpg
                        [thumbnail-width] => 150
                        [thumbnail-height] => 150
                        [medium] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet3-300x206.jpg
                        [medium-width] => 300
                        [medium-height] => 206
                        [large] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet3-1024x705.jpg
                        [large-width] => 1024
                        [large-height] => 705
                    )
    
            )
    
        [3] => Array
            (
                [id] => 52
                [alt] => 
                [title] => exet5
                [caption] => 
                [description] => 
                [mime_type] => image/jpeg
                [url] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet5.jpg
                [width] => 1280
                [height] => 777
                [sizes] => Array
                    (
                        [thumbnail] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet5-150x150.jpg
                        [thumbnail-width] => 150
                        [thumbnail-height] => 150
                        [medium] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet5-300x182.jpg
                        [medium-width] => 300
                        [medium-height] => 182
                        [large] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet5-1024x622.jpg
                        [large-width] => 1024
                        [large-height] => 622
                    )
    
            )
    
        [4] => Array
            (
                [id] => 54
                [alt] => 
                [title] => exet4
                [caption] => 
                [description] => 
                [mime_type] => image/jpeg
                [url] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet4.jpg
                [width] => 1280
                [height] => 914
                [sizes] => Array
                    (
                        [thumbnail] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet4-150x150.jpg
                        [thumbnail-width] => 150
                        [thumbnail-height] => 150
                        [medium] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet4-300x214.jpg
                        [medium-width] => 300
                        [medium-height] => 214
                        [large] => http://169.254.168.252:8888/oxf/wp-content/uploads/2014/01/exet4-1024x731.jpg
                        [large-width] => 1024
                        [large-height] => 731
                    )
    
            )
    
    )
  • 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

    <?php
    /*
    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">
    	<?php
    		
    	$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 -->					
    				</div>
    			</a>			
    		</article>						
    	</div>			
    		<?php endwhile; else: ?>		
    		<p>There are no posts or pages here</p>
    	<?php endif; ?>						
    </div>
    </div>
    
  • Thanks Elliot but could get that to work. Doing a similar thing today with in a custom post type and having the same issue. I’m pulling the info into a template page, will this make a difference?

Viewing 4 posts - 1 through 4 (of 4 total)