Hi, after testing with the plugin I achieved to show custom taxonomies and acf in the cards using the code found in this forum.
But now I have issues trying to show a concrete acf.
What I want to achieve?
I want to show the name of and ACF of relation between posts. For example: House – Name of vendors
I want that each name appeared linked to the each post: For example: Each vendor linked to his page.
Until now, if I use this code I just achieve to show the IDs of the posts:
add_action( 'wpsp_before_content', function( $settings ) {
if ( 12 === $settings['list_id'] ) {
$metas = get_post_meta( get_the_ID(), 'proyectos', true );
if ( $metas ) {
foreach( $metas as $meta ){
echo $meta;
echo ' ';}
}
}
} );
Just in case it could be helpful, to show the array properly in the post page I use this code and it works fine:
<?php $proyectos = get_field( 'proyectos' ); ?>
<?php if ( $proyectos ) : ?>
<?php foreach ( $proyectos as $post_ids ) : ?>
<a href="<?php echo get_permalink( $post_ids ); ?>"><?php echo get_the_title( $post_ids ); ?></a>
<?php endforeach; ?>
<?php endif; ?>
Many thanks in advance.