Custom Post Type not working with password protected posts
-
I am new to CPT UI and as my first project with it i seem to have lost password protection on posts generated from the loop.
I have seen a few posts about ‘wrapping code’ somewhere but i have no idea where i would put this code exactly. Such as the following.. Can someone please tell me which file and at what point i would need to put this in.
I am currently using flatsome theme.
<?php
if ( ! post_password_required() ) {
// Code to fetch and print CFs, such as:
$key_1_value_1 = get_post_meta( $post->ID, ‘key_1’, true );
echo $key_1_value_1;
}
?>The page I need help with: [log in to see the link]
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Custom Post Type not working with password protected posts’ is closed to new replies.