Can someone tell me whats wrong with my code (foreach error)
-
The code works on the admin’s profile but not to other user profile.. im using user front-end pro plugin..
this is the error that i get if the user profile is not admin’s profile
Warning: Invalid argument supplied for foreach() in /mypath/author.php on line 109
this is line 109
foreach ($images as $attachment_id) {
complete code
<?php $images = get_user_meta( get_the_author_meta( 'ID' ), 'personal_playlist' ); if (count($images) > 0) { $array = array(); foreach ($images as $attachment_id) { $array[] = $attachment_id; } $ALL = implode(',', $array); echo do_shortcode('[playlist tracklist="true" style="dark" images="true" artists="false" ids="' . $ALL . '"]'); } ?>
i tried asking for support in their site but they dont give support for custom modifications.. please help me out.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Can someone tell me whats wrong with my code (foreach error)’ is closed to new replies.