Members-only page, but accessible via sharable link

Can be done easily with a shortcode: [members-only]…content…[/members-only] The shortcode will return content for members, or text ‘<h3>This is for members only!</h3>‘, for non member request. The callback function of the shortcode will check who made a request, and return display data accordingly. Any other text on page/post will be displayed as is. For more … Read more

Custom get_the_password_form

If you look at the source code of the get_the_content() function which retrieves the post content, you’d see the following conditional: if ( post_password_required( $post ) ) return get_the_password_form( $post ); And in the get_the_password_form() function, there’s a filter you can use to customize the HTML of the default password form: return apply_filters( ‘the_password_form’, $output … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)