Support

Account

Home Forums General Issues Relationship Field table

Solving

Relationship Field table

  • hi,
    i use Elementor plugin and need to list all Relationship list in a dynamic table for each post in single template elementor.
    i try tablepress and didnt show ACF shortcode and then i install Essential Addons for Elementor and again cant show shotrcode.
    what can i do?

    thanks

  • no one can’t help me ? :/

  • i’m new in php and for my problem found solution. but still have problem to show the result in frontend. i need each item write in own row:
    please someone check the code and tell me about problem in this code:

    <table> 
    	<tr>
    		<th>heading 1</th>
    		<th>heading 2</th>
    		<th>heading 3</th>
    		<th>heading 4</th>
    	</tr>
    		<?php 
    		$posts = get_field('relationship'); //4x post in relationship field linked
    		if( $posts ): ?>
    			<?php foreach( $posts as $p ):?>
    			<tr>
    				<td>
    				<a href="<?php echo get_permalink( $p->ID ); ?>"><?php echo get_the_title( $p->ID ); ?></a>
    				</td>
    			</tr>
    	<?php endforeach; ?></table>
    <?php endif; ?>

    thanks alot

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

You must be logged in to reply to this topic.