I just took a quick look at the theme, since for a change I could actually look at a themes code. The answer is, no, the theme does not use standard WP functions to include template files. What this means is that the standard global variables (like
$post) are not available.
I think you can correct this by simply declaring the global variables that you need to access, in this case
<?php if(have_rows('otros_archivos')): global $post; // add this while (have_rows('otros_archivos')) : the_row(); $post_object = get_sub_field('antecedente'); echo "<ol>"; if($post_object): $post = $post_object; setup_postdata($post); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php wp_reset_postdata(); else: echo "<li>No se ha incluido ningún antecedente aún.</li><br/>"; endif; echo "</ol>"; endwhile; endif; ?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!