I have a button at the top of the website in header.php. That button should transfer me to the Arabic version of the page if I am on an English page.
For example, on contact.html the button should transfer me to contact-ar.html and on info.html the button should transfer me to info-ar.html.
<li><a href="#">arabic</a></li>
I want to know if there is any way to edit part of the header.php from outside?
Try the following. This is given that the original page url has a
.html
in it (contact.html
andinfo.html
)The button might not be the best route to solve this problem. If your aim is to have a separate page for each language then look into using the WordPress ML plugin. This will give you the tools (and buttons) to properly have your site be in two languages.