search does not yield access restricted results

If you setting the posts to private in WordPress, you can add this to your functions.php file: function include_private_in_search( $query ) { // not an admin page and is the main query if (!is_admin() && $query->is_main_query()){ $query->set( ‘post_status’, array ( ‘publish’, ‘private’ ) ); } } add_action( ‘pre_get_posts’, ‘include_private_in_search’ ); Then you can format the … Read more

Custom User Role

Okay, so I have done it. Reading about roles and capabilities: http://codex.wordpress.org/Roles_and_Capabilities A default set of capabilities is pre-assigned to each role, but other capabilites can be assigned or removed using the add_cap() and remove_cap() functions. New roles can be introduced or removed using the add_role() and remove_role() functions. Add a capability: http://codex.wordpress.org/Function_Reference/add_cap If you … Read more

Moved WordPress Directory – Having access issues now

Per the recommended Hardening WordPress and other resources this is what you should look for in your folder permissions: Root Directory / 0755 .htaccess /.htaccess 0644 wp-admin/index.php /wp-admin/index.php 0644 Based on what you’ve described about having to enter your FTP credentials to update/upload plugins I believe you have a ownership/group issue with your files. When … Read more

3rd Party Login in wordpress

Here is some code which i use to login between two site one is in wordpress and one is non-wordpress. I send an ajax request to wordpress site having email and password as data. After get this data on wordpress site i user wp_signon function to login the user. Here is the code. function sign_in_action() … Read more

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