[ad_1]
I start feeling desperate and decided to ask for help.
I need to have a dropdown menu (or any other selector) on a published post and use it to switch templates.
Like on a picture.
Is that even possible please?
[ad_2]Copyright © 2020 - 2022, Project DMC - WordPress Tutorials for Beginners- All Rights Reserved. Privacy Policy
Could you just have 4 versions of the post, one for each template, and the drop-down switches between posts? You could use some JS to switch content a little more seamlessly then a full page reload if need be
You could create a custom taxonomy and use that to trigger which template is initiated (php script to see if the custom taxonomy is selected and init the template from there. Load your content as a custom field and you can cycle between them with zero changes to the copy)
Its not free but the Avada theme can do this out of the box using its custom field and template builder if you don’t want to manually code it
If you can reload the page after selection just use a cookie/session and then hook into where the single template file is and swap the template include based on the cookie/session.