theme view switching

I make a theme with two views. I want to switch between these two views.

If condition is true i want one view.
If it is false i want default view.
Pls help.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking