Password Protect Pages Not Working

Replace all of this: $my_postid = get_page( $page_id );//This is page id or post id $content_post = get_post($my_postid); $content = $content_post->post_content; $content = apply_filters(‘the_content’, $content); //$content = str_replace(‘]]>’, ‘]]>’, $content); echo $content; …with this: the_content();

How to show password fields on registration form w/o plugins

show_passwords_fields actually is a filter! You can hook into it as you did above, using an anonymous function: add_filter( ‘show_password_fields’, function(){return true} ); You can also write a function, and use it as a callback: function wpse_79994_show_password_fields() { return true; } add_filter( ‘show_password_fields’, ‘wpse_79994_show_password_fields’ ); However, as are only returning a boolean (true or false) … Read more

Making WordPress available while logged into another website

The function wp_authenticate is pluggable, meaning you can override it with a function of your own of the same name. You could rewrite that to contact your “self-hosted, secure, members-only website” for logins instead of using the WordPress login system. There are other pluggable functions in that file, like wp_validate_auth_cookie, which may prove useful with … Read more

Put password on a wordpress link in a article

I think this is almost what the article Add Private Content to Posts via Shortcode talks about. But it’s only for registered users: add_shortcode(‘private’, ‘private_content’); function private_content($atts, $content = null) { if ( is_user_logged_in() ) return ‘<div class=”private-content”>’ . $content . ‘</div>’; return ”; } And used inside the post/page like: [private] This post contains … Read more

Copy and Paste Password for Comments

That is not a feature of WordPress. I have seen that particular wording before though. It is added by the “Spam Free WordPress” plugin. And yes, it’s not a great way to go. For spam prevention, I recommend using these plugins instead: Akismet Cookies for Comments Simple Trackback Validation

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