Quantcast
Channel: Tagged with repeater - Plugin Support
Viewing all articles
Browse latest Browse all 160

Users Field Problem

$
0
0
I have made a repeater field (Cast) which has another repeater (Cast Members) and that field has 2 inputs,
One is Name which you can choose a regustered user, and the second is Role which you type in the Role name of that actor (user. But i cannot get it to work i have tried everything, i dont know what i am doing wrong.

I get this error btw : Warning: Invalid argument supplied for foreach() in C:\wamp\www\nlpro\wp-content\themes\nlPRO\fields\users_field.php on line 401

Bellow i have attached a screenshot of my wordpress repeater table so you can see the fields.

This is my Code:



CAST

<?php if( get_field('cast') ): ?>


Actor Name
Role

<?php while( has_sub_field('cast') ): ?>
<?php if( get_sub_field('cast_members') ): ?>
<?php while( has_sub_field('cast_members') ): ?>

<?php $rows = the_sub_field('name'); ?>
<?php foreach($rows as $row) : ?>
<?php $row['user_firstname']; ?>
<?php endforeach; ?>
<?php the_sub_field('role'); ?>

<?php endwhile; ?>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
/table>






Thanks in Advance

p.s Great plugin btw, saved me tons of time. Keep up the good work.

Viewing all articles
Browse latest Browse all 160

Trending Articles