I'm completely new to PhP, so please bear with me.
I have a WP website, that I have not created (I barely understand PhP), but I have been tasked with putting an if statement into the footer.php
The idea is to have an if statement that will check which page is loaded, and then provide appropriate A HREF link in the footer. So, if the index.php is loaded A HREF in the footer should lead to website X. If ANY other page is loaded then the A HREF in the footer should lead to website Y.
In other words - I want the footer link to lead to website X only when the user is viewing the index.php, if any other page is loaded I want it to lead the user to website Y.
Would anyone be able to give me an example of how to achieve this? I have tried googling and I understand the solution is there, but being new to PhP I've had no luck.
Aucun commentaire:
Enregistrer un commentaire