0

The main page contain manu1 and articles
The subpage contain menu2 and articles
Articles uses "single.php" template

How to achive this: When I click on the article at main page; menu1 should be used (as on the main page) When I click on the article at subpage; menu2 should be used (as on the subpage)

Here is visualization

*My question refer to menu but it could be any piece of code or widget

  • You need to provide details of what you have tried and specifics of your environment (e.g. are you using a pre-built theme, are you using a custom built/starter/child theme, if you're coding the templates, where's your code samples) – Ryan Jan 03 '19 at 17:01
  • @Ryan I just add visualization. I am building this template from scratch. I don't have code for single.php yet. Code for index and page-subpage are very generic and looks like
    – user1379570 Jan 04 '19 at 10:07

1 Answers1

0

I found hint here: https://stackoverflow.com/a/18362383/1379570

I will set URL variable at "index" and diffrent variable value at "page-subpage" so I will be able to distinguish that I should use menu1 or menu2 on the single.php page.