Support

Account

Forum Replies Created

  • Hi again!

    Finally I edit my code and works!

    This is the code:

    <?php if(have_rows('otros_archivos')):
    	while (have_rows('otros_archivos')) : the_row(); 
    	$post_object = get_sub_field('antecedente');
     		if($post_object):
    			$post = $post_object; setup_postdata($post); ?>
    			<a href="<?php the_permalink(); ?>" target="_blank"><?php the_title(); ?></a>
    			<br/><br/>
    			<?php wp_reset_postdata();
    		else:
    			echo "<i>No se ha incluido ningún antecedente aún.<br/></i>";
    		endif; 
    	endwhile;
    endif; ?>

    Anyway thanks for your help James.

    I hope this code can help someone!

  • Hi!

    So the else line code doesn’t work because the rows are empty. That must be it… I try many times to edit this code without success.
    Please can you help to edit my code for that else part works well?

    Thanks in advance!

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