How can I fetch user registration age

Solved the above task, posting the answer here so that someone can use the code I added this code in functions.php function is_user_video_perweek( $reg_days_ago ) { $currentuser = wp_get_current_user(); return ( isset( $currentuser->data->user_registered ) && strtotime( $currentuser->data->user_registered ) < strtotime( sprintf( ‘-%d days’, $reg_days_ago ) ) ); } and then in footer.php I called this … Read more

Limit users to specific uploads

Add this code in your Functions.php. This code help you to show user only their own uploads but admin can see all media uploaded by other users and this code is tested on current wordpress Version 5.8 // Limit media library access add_filter( ‘ajax_query_attachments_args’, ‘wpb_show_current_user_attachments’ ); function wpb_show_current_user_attachments( $query ) { $user_id = get_current_user_id(); if … Read more

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