Home › Forums › General Issues › Showdown content if current user.. › Reply To: Showdown content if current user..
Hi there! Thank for your suggestion, but it doesn’t work yet.
If I use the code you wrote above, I receive an error, which tells me that the second parameter should be an array for the script..
Because it is a string, I have ended up using this code :
<?php $current_user = wp_get_current_user(); ?>
<?php global $user_login;
get_currentuserinfo(); ?>
<?php $lookforuser = get_field('mustjoin') ?>
<?php if (strpos($lookforuser, $user_login) !== false) { ?>
<?php while ($day['events']->have_posts()) : $day['events']->the_post() ?>
<?php tribe_get_template_part('month/single', 'event') ?>
<?php endwhile; ?>
<?php } ?>
And it works at 99.5%!
The problem is when I open the calendar page, I can’t see anything.. as soon as I manually refresh the page, all the events (where I am supposed to join) appear.
It seems it needs to re-collect the infos..
How can I fix it? (I tried with different computers/browsers, no changes..) Thank you.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.