What is the best way to organize template parts?

Looking at the following source codes

you are going to have issues, more with your custom headers and footers. I do not know what portfolio is and how it will be used, so I cannot answers on that specific subject

get_footer() and get_header() does not allow for custom headers and footers to be loaded from a subfolder. Looking at the source codes, the only valid file names are as follow

  • For headers, it will be header-{$name}.php and header.php

  • For footers, it will be footer-{$name}.php and footer.php

There are no filters to adjust this behavior in get_footer() and get_header(). There is a hackish method that you can use here though. For this to work, you will need to name your folders as follow

  • For headers, you will need to name your folder header-{whatever}, where {whatever} can be anything you like

  • For footers, you will need to name your folder footer-{whatever}, where {whatever} can be anything you like

(Note: Using anything else than header and footer as prefix in the folder name will not work). You can then call your custom footers and headers in the following manner

get_header( 'whatever/header-centered' );

which create a filename like header-whatever/header-centered.php

As for template parts, I cannot see any issues right of the back. All you need to remember is to add the subfolder name as part of $slug

Instead of

get_template_part( 'content', 'single' );

you will need to do the following if your subfolder is called content

get_template_part( 'content/content', 'single' );