Your idea of the template page URL wouldn’t really work because it would need to load WordPress, which is all backward.
If you make a Page or even a custom post type, you can use the slug to indicate which one it is. If you can’t reuse the slug (since rewrites look for Pages first), you could use post meta field. A taxonomy is a bit much since there would only be one of each term, but it might be useful to be able to list all the committees easily.
Page templates can be applied to Posts also, so that is not a deciding factor. But you have to actually choose them. If you make these custom post type, you could apply the template based on that, without having to choose it manually. Same with a taxonomy.
I guess you should look at what the URL would be.
site/category/budget shows all the posts in the budget category
site/budget is a Page which could have the template applied
site/committees could be a Page or the archive page for custom post type
site/committees/budget could be a Page or a custom post
Let me try to clarify a few things.
First, my current (experimental) page template (committee-page.php) contains pieces of code like this:
$args = array('category_name'=>'budget','tag'=>'intro');
$the_query = new WP_Query($args);
if ( $the_query->have_posts() ) {
$the_query->the_post();
get_template_part( 'template-parts/content', 'page' );
}
There are similar chunks for the members, most recent agenda, and three most recent minutes.
Notice that the category slug is hard-coded in the template, so I would need 20 almost identical page templates to handle the 20 committees. Obviously, I would like to avoid this if possible.
The difficulty, it seems, is that a committee page is built from posts that require very specific WP_Query() arguments. I see no other way to assemble those posts that to make several separate queries.
This also means that some posts are displayed in two or more different contexts, and will be formatted somewhat differently in each context. So the post itself cannot use a single tag or field or custom type to identify in advance the context in which it will be used.
Is there an alternative to using PHP parameters? For example, can my committee-page.php template discover attributes (URL, category, tag, custom field) of the page that is being constructed from that template? Those attributes might provide enough information to recover the category slug that I need, rather than having it hard-coded.
]]>