You are overthinking this. The namespace structure applies at the level of individual package. There is no need or push to treat the whole site as such package.
Also one of the benefits of using autoload in first place is that it makes location of classes in file system largely irrelevant.
So the simple and practical approach is to:
- Handle namespaces at individual package (plugin/theme) level.
- Use PSR-4 support in Composer for simple directory structure inside packages, without excessive folder levels.
Related Posts:
- Why include a composer.json file with my plugin?
- Autoloading in Child Theme
- Customize default settings on new sites on multisite
- Does wordpress allow me to add a php file to the root directory to execute custom scripts?
- Use composer to load custom classes [closed]
- What’s the proper way to use wp_enqueue_script/style?
- How to send user data in json format to another server when user register on wordpress site in PHP
- Change the actual (or viewable) WordPress directory structure
- Accessing site’s root from themes folder
- Custom location for attached images
- Using a `Template Parts` folder instead of an `Includes` folder in a Custom WordPress Theme
- Using WordPress gettext functions in a library outside plugin or theme scope
- How to Arrange PHP Files to Allow for Multiple Types of Pages?
- Correct folder permissions?
- subdirectory index.php is not working
- Accessing an image folder inside public web directory
- Noscript not working as it should in wordpress site
- Code Executing Too Late?
- PHP in CSS file?
- Plugin development and composer
- How can I search all plugins for composer’s vendor/autoload.php?
- Composer setup-config.php not found
- Using the get_template_part method within an mu-plugin not possible?
- New user – Create a folder
- Autoloading Classes in Plugins
- How to override html codes in wordpress?
- How do I prevent a folder from reappearing in my home directory?
- Resource 404 error on multisite subdirectory install
- Changes in header.php not reflecting
- Removing get_template_part in child theme
- Permission functions within wordpress
- WP white screen of death after duping a site that works fine on same server
- Correct Syntax for uploading files to custom directory in WordPress
- Can I have a php site on subdirectory of WordPress?
- How to add a php package to an existing wordpress website
- Get a list of folders inside uploads directory
- How to link the path of a folder situated in public.html for a random video player?
- Why is my str_replace not working on short code submitted by front-end?
- Detecting if parent page has gallery
- Skip foreach loop
- Displaying posts based on category
- stripping tags from excerpt in WordPress is not working
- Prev/Next Links Broken on Static Front Page Pagination
- Pagination broken on is_front_page()
- Changing the color scheme based on the url visited
- Why is an array created in a function hooked to customize register populated when customizer is loaded but not when the front-end is loaded?
- Mixing variables into an array when inserting values
- Don’t show certain div on front page?
- Could use some help with Shortcodes
- How to integrate noimage picture in this code
- Javascript not loading on certain page
- Location of core code for database connection and get_header
- Deleting Certain terms from appearing on the front end as links
- get comment data using comment id
- meta box not display data input in the textarea
- Clickable image link sends people to wrong URL
- wpdb prepare insert table doesn’t work
- Should I use WordPress to skin a database website?
- php include not working in custom page
- How to modify the default feed via a function
- How do I display offsite database info on my wordpress site?
- Styling the second sidebar
- first instantiated SimplePie object cosumes 5mb?
- Adding a line of text to php code
- If ‘editor’ is empty, then
- Different Subdomain changes page content
- Theme not calling Jquery properly
- customize wordpress database error page
- Removing the comment function within wordpress
- Creating Database Table vs. Adding MetaData to Post & User
- Post’s ID pattern?
- Countdown to date function?
- Include text in echoed hyperlink
- How to put a form with php code into a variable or shortcode?
- Utilize Function in Child Theme / Template File
- Add class to DIV depending on page loaded
- Need oop for wordpress theme? [duplicate]
- Display Youtube Time Automate from Key
- Content filter won’t work
- How to retrive the text : No movie by this actor
- Make a database query using WordPress
- Is the 404 page automatically displayed if a loop returns nothing?
- update_post_meta only updating on last loop of foreach
- How to have different header.php based on the user logged in?
- How do I remove a category from a wordpress loop>
- How can i count the post added in relationship field, theme display
- Link blogname and blogdescription to the Options Framework
- Liking a facebook page from wordpress website?
- Isotope Drop Down Categories Filter Function
- First Byte Time (back-end processing)
- How do I define a lookup table that will work across all PHP elements of the template?
- How to keep track of when a vote is cast?
- trouble with page_id & highlighting current page
- Convert the_permalink() function output into string
- Making my first wordpress template
- How to use array in function to get only value I want
- Apply class to every third list item? [duplicate]
- Only show image from custom field when present
- Cinema site, retrive the movies that actor play in
- How to include custom code on a page that’s set to act as homepage?