Support

Account

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.