Title: wrong password
Last modified: April 23, 2021

---

# wrong password

 *  Resolved [janbrokes](https://wordpress.org/support/users/janbrokes/)
 * (@janbrokes)
 * [5 years ago](https://wordpress.org/support/topic/wrong-password-7/)
 * Hello,
    thank you for your plugin. I am trying to hide post custom fields values
   in single.php, but i still receive that password is wrong. Have you any idea,
   where i do mistake?
 * here is my code
 *     ```
                                       <div class="informace">
                                       <p>Hodnocení: <strong><?php $key_name = get_post_custom_values($key = 'ratebeer');echo $key_name[0]; ?></strong></p>
                                       <p>Cena: <strong><?php $key_name = get_post_custom_values($key = 'cena_kc_objem');echo $key_name[0]; ?></strong></p>
                                       <p>Hodnocení: <strong><?php $key_name = get_post_custom_values($key = 'ratebeer');echo $key_name[0]; ?></strong></p>
                                       <p>Cena: <strong><?php $key_name = get_post_custom_values($key = 'cena_kc_objem');echo $key_name[0]; ?></strong></p>
   
                                       <?php 
                                       ob_start();
                                       ?>
                                       <p>Hidden content</p>
                                       <p>Hodnocení: <strong><?php $key_name = get_post_custom_values($key = 'ratebeer');echo $key_name[0]; ?></strong></p>
                                       <p>Cena: <strong><?php $key_name = get_post_custom_values($key = 'cena_kc_objem');echo $key_name[0]; ?></strong></p>
   
                                       <?php $content = ob_get_clean();?>
   
                                       <?php echo do_shortcode('[ppwp passwords="test"]'.$content.'[/ppwp]'); ?>	
   
                                       </div>
       ```
   
 * thank you
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwrong-password-7%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [WP Folio Team](https://wordpress.org/support/users/buildwps/)
 * (@buildwps)
 * [5 years ago](https://wordpress.org/support/topic/wrong-password-7/#post-14356155)
 * Hi [@janbrokes](https://wordpress.org/support/users/janbrokes/),
 * Thanks for reaching out to us.
 * To assist you better, might we know:
    - Are you using our PPWP Lite or Pro version?
    - Which theme are you using?
    - Do you use any plugin to create the custom fields?
 * Please refer to our documentation on [how to protect ACF custom field values](https://passwordprotectwp.com/docs/how-to-password-protect-partial-content-custom-fields/#custom-fields).
 * You might want to drop an email at hello(at)preventdirectaccess.com for faster
   assistance.
 * We look forward to your reply.
    -  This reply was modified 5 years ago by [WP Folio Team](https://wordpress.org/support/users/buildwps/).
 *  Thread Starter [janbrokes](https://wordpress.org/support/users/janbrokes/)
 * (@janbrokes)
 * [5 years ago](https://wordpress.org/support/topic/wrong-password-7/#post-14356864)
 * Hello,
    1) lite version 2) Divi (but not using divibuilder for post content –
   i do customization via single.php 3) Advanced custom field. Thanks for any idea
   how to update me code above (1st comment)
 *  Plugin Author [WP Folio Team](https://wordpress.org/support/users/buildwps/)
 * (@buildwps)
 * [5 years ago](https://wordpress.org/support/topic/wrong-password-7/#post-14359050)
 * Thanks for your reply, [@janbrokes](https://wordpress.org/support/users/janbrokes/).
 * First of all, custom field protection is an advanced feature available on PPWP
   Pro version only.
 * Secondly, if you’re using ACF, you should use WYSIWYG editor and wrap the protected
   section with our ppwp shortcode.
 * Finally, you should display the field on your content using our custom code as
   below.
 *     ```
       <?php
       // Change "field-name" to your custom field name
       echo '<div class="ppwp-is-custom-field" ppwp-data-mt="field-name">';
   
       foreach( get_post_meta( get_the_ID(), 'field-name' ) as $meta_data ) {
           echo do_shortcode( $meta_data );
       }
       echo '</div>';
       ?>
       ```
   
 * As you can see from the code, our plugin protects a section based on content 
   ID or field ID.
 * Without this piece of information, we can’t compare the correct password and 
   unlock the protected section properly.
 * As a result, even though the password form is shown, you will receive an incorrect
   password message all the time.
 * Let us know if it makes sense to you.
    -  This reply was modified 5 years ago by [WP Folio Team](https://wordpress.org/support/users/buildwps/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘wrong password’ is closed to new replies.

 * ![](https://ps.w.org/password-protect-page/assets/icon-256x256.jpg?rev=3263311)
 * [PPWP - Password Protect Pages](https://wordpress.org/plugins/password-protect-page/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/password-protect-page/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/password-protect-page/)
 * [Active Topics](https://wordpress.org/support/plugin/password-protect-page/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/password-protect-page/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/password-protect-page/reviews/)

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)

 * 3 replies
 * 2 participants
 * Last reply from: [WP Folio Team](https://wordpress.org/support/users/buildwps/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/wrong-password-7/#post-14359050)
 * Status: resolved