• Resolved xxkiefxx

    (@xxkiefxx)


    Hi,
    I’ve added custom field to attach a pdf file and I’m using profile builder to hide the content to no logged member of some posts.
    I’ve added to the template file the code:

    $files = rwmb_meta( 'field_id' );
    foreach ( $files as $file ) {
        ?>
        <a href="<?php echo $file['url']; ?>"><?php echo $file['name']; ?></a>
        <?php
    }
    

    to show the attachment in the post, but in this way, even if I block the access of the content I can still see the attachment field in the post.

    What I cannot figure it out is how to show the custom file inside the loop “the content” to allow profile builder to hide also the attachment field.

    What am I doing wrong?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘custom field into “the content”’ is closed to new replies.