One post but two separate permalink structure and template views

If the people who need to see the reporter assignment / photographer assignment information all have WordPress logins, it would be a lot more secure to just have postmeta that is only visible when in wp-admin. You can create a custom column so that when you view all your Posts, one of the columns shows the reporter, and another shows the photographer. (See How can I add columns to the post edit listing to show my custom post data?)

Or, if they all have WP logins and you want them to see this data when viewing individual posts on the front end, you could

  1. Add postmeta boxes for “photo assignment” and “reporter assignment” to your posts. (See Problem in custom meta boxes)

  2. (In a child theme) update your single.php file. Wherever you want to conditionally show the assignment, add

if( is_user_logged_in() ) {
echo 'Reporter: ' . get_the_field('reporter_assignment');
echo 'Photographer: ' . get_the_field('photographer_assignment');
}

If they don’t all have WordPress logins and you are okay with the possibility that someone in the public might see these assignments, you can still handle everything with plain postmeta (no need for ACF). You would:

  1. Add postmeta boxes for “photo assignment” and “reporter assignment” to your posts.

  2. (In a child theme) update your single.php file. Wherever you want to conditionally show the assignment, add

if($_GET['show_assignments'] == true) {
echo 'Reporter: ' . get_the_field('reporter_assignment');
echo 'Photographer: ' . get_the_field('photographer_assignment');
}

The public will see your regular URL, such as example.com/post/, and whoever needs to see the additional details will need to use the URL example.com/post/?show_assignments=true

  1. You should also make sure to set the canonical URL so Google knows to index the version without query strings. Most SEO plugins will handle this for you.

  2. If you have Google Analytics you should also tell it to ignore the show_assignments query var, so it doesn’t show visits to the query-string version separately from visits without the query string.