Use an empty page to build custom plugin output
You are asking a couple of things in one question. Before we sort things out, let’s get straight to the point: You are looking for the template_include hook. It is the hook, which is lastly called before the final output. In this phase, WordPress decides which template to pick. To achive your goal, you need … Read more