I am trying to show a list of relationed posts through a custom field (which I've created using Advanced Custom Fields, by the way). I am using genesis Framework and a child theme (of course). The custom Field is a relationship field and it is called "lecciones_relacionadas". I've marked it as an object, too.
I have a Custom Post Type called "lecciones" (which I created with CPT UI plugin. At the end of every "lecciones" I'd like a list with all the other relationed lecciones.
I've created this snippet and attached at the end of the functions.php, but it doesn't work.
add_action ( 'genesis_after_entry_content' , 'completar_lecciones' );
function completar_lecciones() {
if (is_singular ('lecciones')) {
the_field('lecciones_relacionadas');
}
}