-3

I've got three home pages: 1. home 2. home-student 3. home-teacher

Based on their custom user role (student, teacher or not logged in) I would like to show a different homepage. My knowledge of PHP is pretty basic, so I'm hoping for an easy answer (or line of code I could paste in my child theme). Many thanks!

1 Answers1

2

Since you do not have a lot of php experience, you may want to use a plugin like this one

https://wordpress.org/plugins/user-specific-content/

You can then use shortcodes in your homepage content to designate who see what. Like...

[O_U user_id="1"]Content goes here[/O_U]

There are other methods, but they would require hacking the page.php template. As long as you're not trying to have the header and footer look different, the plugin should late you have different page content for different roles.

Web Guy
  • 92
  • 1
  • 11