• Resolved Moofin

    (@moofin)


    Hi there,

    I’ve setup my users and the page that I want hidden however all of my custom fields are still visible.

    I’ve using the following wordpress conditional tag and it’s still not hiding it.

    if ( ! post_password_required() ) {
    
      if( have_rows('download_file_list') ):
           echo '<h2>Downloads</h2>';
           echo '<ul class="downloadList">';
           while ( have_rows('download_file_list') ) : the_row();
                 echo '<li><a target="_blank" href="'.get_sub_field('upload_file').'">';
                  the_sub_field('file_name');
                  echo '</a></li>';
    
           endwhile;
           echo '</ul>';
       endif;
    }

    Is it possible to hide content that is populated using Advanced Custom Fields?

    Many thanks

    https://wordpress.org/plugins/simple-membership/

Viewing 1 replies (of 1 total)
  • Thread Starter Moofin

    (@moofin)

    So I think I found it out by using the following:

    $au = BAuth::get_instance();
    if ($au->is_logged_in() ) {
      if( have_rows('download_file_list') ):
           echo '<h2>Downloads</h2>';
           echo '<ul class="downloadList">';
           while ( have_rows('download_file_list') ) : the_row();
                 echo '<li><a target="_blank" href="'.get_sub_field('upload_file').'">';
                  the_sub_field('file_name');
                  echo '</a></li>';
    
           endwhile;
           echo '</ul>';
       endif;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘My custom fields aren't hidden’ is closed to new replies.