Support

Account

Home Forums Backend Issues (wp-admin) Data is there but only visible after update

Solved

Data is there but only visible after update

  • Hi!

    I have imported some data and mapped it to the right fields I created with ACF (packaged with Avada). That import is not the issue. Afterwards I check and all the data is there. Nevertheless when I check front-end no data is showing. I need to go to the post in the backend and update it before the content will show front-end.

    Now at this point I thought, why not do a bulk edit.. that should do the trick. But no joy… that is not working.

    This is only happening with the taxonomy field.

    So maybe some wrong code there? Let me show you:

    
    <?php while ( have_posts() ) : ?>
    	<?php the_post(); ?>
    		<article id="post-<?php the_ID(); ?>" <?php post_class( 'post' ); ?>>
    			<div class="post-content">
    				<?php if( get_field('titel') ): ?><h1><?php the_field('titel'); ?></h1><?php endif; ?>
    				<?php if( get_field('omschrijving') ): ?><p><?php the_field('omschrijving'); ?></p><?php endif; ?>
    
    				<!-- The php below is to list the taxonomy 'categorie' -->
    				<?php 
    					$terms = get_field('categorie');
    					if ( !empty( $terms ) && !is_wp_error( $terms ) ){
    					 echo "<ul>";
    					 foreach ( $terms as $term ) {
    					   echo "<li>" . $term->name . "</li>";
    					
    					 }
    					 echo "</ul>";
    					}
    				?>
    
    				<!-- The php below is to list the taxonomy 'categorie' -->
    				<?php 
    					$terms = get_field('maker');
    					if ( !empty( $terms ) && !is_wp_error( $terms ) ){
    					 echo "<ul>";
    					 foreach ( $terms as $term ) {
    					   echo "<li>" . $term->name . "</li>";
    					
    					 }
    					 echo "</ul>";
    					}
    				?>
    
    			</div> <!-- post-content -->
    		</article>
    <?php endwhile; ?>
    
    

    Now i’m not that great with php… so could really be possible that it is the code for pulling the content from the custom taxonomies.

    Thanks for any help.
    Paul

  • Never mind…. turns out I needed to map both taxonomies and acf fields with csv importer pro. so solved.

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

You must be logged in to reply to this topic.