I am building a website.
I have built a website. For each page, the header and footer are being included as a php include. In the past, before i decided to use insert, i would simply add class='current'. However, as its an include I cant just do that because that same bit of code is used for all pages and if i put current class on home link for example, then even when your on the about us page the home link will have the current class. How do I overcome this?
in your
header.phpfile add a function to check which page is the current page andthen , update your
menu codeso it will have a condition like: