Planned private posts get published immediately

The problem is that changing the post visibility to private invokes a status change, in a way private is not only a visibility but also a publishing status. Or to quote the WordPress Codex, section »Content Visibility – Private Content«. Once you change the visibility to private, the post or page status changes to “Privately … Read more

How to show just private posts in loop

You need to filter the main WordPress query using the pre_get_posts action. This code will get you started: function show_only_private_post_for_logged_in_users( $query ) { if ( ! $query->is_main_query() || is_admin() ) { return; } if ( is_user_logged_in() ) { $query->set( ‘post_status’, ‘private’ ); } } add_action( ‘pre_get_posts’, ‘show_only_private_post_for_logged_in_users’ ); It will only affect the main query … Read more

Restrict WordPress to Private

Use this : http://wordpress.org/extend/plugins/password-protected/ A very simple way to quickly password protect your WordPress site with a single password. Integrates seamlessly into your WordPress privacy settings. How can I change the WordPress logo to a different image? Install and configure the Login Logo plugin by Mark Jaquith. This will change the logo on your password … Read more

Disable comments from showing up public for Custom Post Type

Removing Custom Post Types’ comments from Recent Comments Widget The arguments for the recent comments widget can be customized using the widget_comments_args filter. To customize the post types types whose comments will be included, we can customize the $post_type variable: $post_type Post type or array of post types to retrieve affiliated comments for. Pass ‘any’ … Read more

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