WordPress Only allow users to see their own media uploads

// 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 ( $user_id && !current_user_can('activate_plugins') && !current_user_can('edit_others_posts
') ) {
        $query['author'] = $user_id;
    }
    return $query;
} 

Remove menu items for non admins

function TRIM_ADMIN_MENU() {
    global $current_user;
    if(!current_user_can('administrator')) {
        remove_menu_page( 'tools.php' ); // No tools for <= editors
        remove_menu_page( 'activity_log_page' ); // Activity log
    }
}
add_action('admin_init', 'TRIM_ADMIN_MENU');

WordPress unregister post type

if( !function_exists( 'plugin_prefix_unregister_post_type' ) ) {
    function plugin_prefix_unregister_post_type(){
        unregister_post_type( 'project' );
    }
}
add_action('init','plugin_prefix_unregister_post_type');

Create New Post Type – WordPress Native

function create_posttype() {
  register_post_type( 'wpll_product',
    array(
      'labels' => array(
        'name' => __( 'Videos' ),
        'singular_name' => __( 'Video' )
      ),
      'public' => true,
      'has_archive' => true,
      'rewrite' => array('slug' => 'videos'),
    )
  );
}
add_action( 'init', 'create_posttype' );

Default .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{QUERY_STRING} ^page_id=([0-9]*)&category=(.*)$
RewriteRule ^(.*)$ /%1/%2? [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

WordPress Login Loop to Dashboard

So for the specificity of this case I was redirecting to the admin dashboard continuously when ever I tried to navigate to the home page.

I was logged in as admin.

The problem was that I updated my email and this caused a conflict with the site.
WordPress wanted me to first confirm the new email before I could go to the website front end.

Alternatively if this is not your solution perhaps check this link.
It looked good.

https://www.hostinger.com/tutorials/fix-wordpress-login-redirect-loop