Home Forums Front-end Issues AFC – show files in comments


AFC – show files in comments

  • I’m trying to add feature to my website where users will be able upload files in comments. I’m trying to do that using Advanced Custom Fields plugin.

    Some parts of job are done. I have upload option while writing comment and after submiting comment the file is visable via WordPress administration.

    Comment administration (file is visable at the bottom)

    Custom field settings

    Code for frontend I’m using in comments template

      $cfile = get_field('comment_file');
      if( $cfile ): ?>
        <a href="<?php echo $cfile['url']; ?>"><?php echo $cfile['filename']; ?></a>
      <?php endif;

    The problem is – I can’t see file in frontend part of website. Like there is no file(s).

Viewing 1 post (of 1 total)

The topic ‘AFC – show files in comments’ is closed to new replies.