Support

Account

Forum Replies Created

  • Great news! Thanks for the update funkjedi 🙂

  • Yup, ACF V5 PRO and ACF qTranslate wont play nice (at least with qTranslate Plus). Had to go back to ACF v4 so everything works good.

    Won’t work: WP 4.1.1 + ACF PRO 5.1.7.1 + Advanced Custom Fields: qTranslate 1.4 + qTranslate Plus 2.7.2 inc. Patches
    Works: WP 4.1.1 + ACF 4.4.0 + Advanced Custom Fields: qTranslate 1.4 + qTranslate Plus 2.7.2 inc. Patches

    It looks like “ACF5PRO” is not recognising the new fields created by “Advanced Custom Fields: qTranslate 1.4”, so when you assign them and save your custom fields, they appear as regular ones. Then the editor will break apart silently.

    Please let me know if this gets fixed, since ACF5PRO was playing great.

    Thanks!

  • I’m having the same exact problem you have but on my archive-custom-post-type.php page with Advanced Custom Fields Pro latest version.

    This is the code i’m using:

    <section id="debates-home">
    	<?php 
    	
    	$the_query = new WP_Query( array( 'post_type' => 'debate' , 'orderby' => 'date', 'posts_per_page' => 2 ) ); 
    	if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();  
    	
    	$term = wp_get_post_terms($post->ID, 'area', array("fields" => "names"));
    	$term_slug = wp_get_post_terms($post->ID, 'area', array("fields" => "slugs"));
    	
    	?>
    	
    	<article>
    		<?php the_post_thumbnail(); ?>
    		<div class="info-debate">
    			<a class="category-link" href="<?php echo get_site_url(); ?>/area/<?php echo $term_slug[0] ?>/?post_type=debate"><?php echo $term[0]; ?></a>
    			<h3><a href="<?php the_permalink(); ?>" title="Ver debate: <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    		
    			<?php 
    			
    			$posts = get_field('columnas_del_debate');
    			
    			if( $posts ): ?>
    			    <ul>
    			    <?php foreach( $posts as $post): ?>
    			        <?php setup_postdata($post); ?>
    			        <li>
    			            <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('thumb'); ?></a>
    			            <span class="tooltip">
    			            	<em><?php the_title(); ?></em><br> <?php the_field('autor_de_columna'); ?>
    			            </span>
    			        </li>
    			    <?php endforeach; ?>
    			    </ul>
    			    <?php wp_reset_postdata(); ?>
    			<?php endif; ?>
    								
    		</div>
    	</article>
    	
    	<?php endwhile; ?>
    		
    		<?php wp_reset_postdata(); ?>
    	
    	<?php else : ?>
    		<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
    	<?php endif; ?>			
    </section>
    

    The code works fine on my index.php and will break on archive-custom-post-type.php page. The only difference in the code on the archive page is that the loop is just the plain version with no args since I don’t need to modify the loop.

    If turn wp_debug on i’ll see the following error on my index.php:

    Notice: Trying to get property of non-object in /wp-includes/query.php on line 4618
    
    Notice: Trying to get property of non-object in /wp-includes/query.php on line 4620
    
    Notice: Trying to get property of non-object in /wp-includes/query.php on line 4622
    
    Notice: Trying to get property of non-object in /wp-includes/query.php on line 4623
    
    Notice: Trying to get property of non-object in /wp-includes/query.php on line 4631
    
    Notice: Trying to get property of non-object in /wp-includes/query.php on line 4646

    I tried what Elliot said before and ACF seems to be working fine cause the array with the related posts appears within the print_r.

    Is there a way to use setup_postdata inside the loop on an archive-custom-post-type.php page?

    Thanks!

    PD: I lost my old forum account, dont know why? Was the forum reset or something?

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