I’m doing a project where the same page content is going to be displayed to different audiences and need to be able to display the same content using different page templates. The reason for the different page templates is so I can include a different sidebar for each audience.
Given the three audiences [Users, Developers, and Managers], I want to show a sidebars like so:
I’ve setup three page templates based on my index.php template and included the appropriate sidebar templates. However, when I write a page, I have to associate it with a single page template.
What I would like to do is create duplicate /index.php (not template index.php, but wp-root/index.php) files named /users.php, /developers.php and /managers.php and pass the appropriate template name to them. That way all the browsing of done while using that copy of index.php will being using the right page template.
Is this possible?
- The topic ‘Using different page templates with the same page content’ is closed to new replies.