I have a live website that is using the custom post type "virtual-programs" and I have a template that currently works called single-virtual-program.twig and single-virtual-program.php.
I am developing new templates (single-virtual-program-new.twig and single-virtual-program-new.php)
They will eventually replace (single-virtual-program.twig and single-virtual-program.php)
During development I want to have both templates active, then once I'm happy with it, I will activate the new templates and remove the the old templates.
To do this I will need to create custom URLs for my NEW templates so I can view them while the old templates are still live. How do I go about that?
FYI I'm using Timber (.twig).
Here is the code from single-virtual-program.php
$post = Timber::query_post();
$context['post'] = $post;
$context['archive_link'] = get_site_url(null, str_replace('_', '-', $post->post_type));
$context['virtual_programs'] = Timber::get_posts(
array(
'post_type' => array('virtual_programs'),
'post__not_in' => array($post->ID),
'posts_per_page' => 5,
'meta_query' => array(
array(
'key' => 'event_type',
'value' => array('online', 'Online Short Course'),
'compare' => 'NOT IN'
)
)
)
);
$context["register_event_url"] = get_field("prices", $post->ID)[0]["register_link"];
Timber::render( 'single-virtual-programs-new.twig' , $context );
Thank you.