Get Name of the Current Template File
Get Name of the Current Template File. In wordpress, you need to edit certain posts and pages based on the page template and ID of the template. Here I have small code snippet to get the current page, page template. Before getting into the page template work, we need current page or Post ID to query the current post template. Let’s begin with code. <?php ...