Ok so I have a page with four links on it. Now rather than having the links link to a separate page I would like to stay on the same page but swap the contents of a div on this page, as it is the same page but with different content in the middle. Im working in WordPress and I have created the separate parts for the middle content in different files, lets call them cont_one.php, cont_two.php, cont_three.php, cont_four.php.

So how would I go about doing this should I use php or jQuery? And How would I create an if statement that would know if the link is clicked then swap the content. I’m not asking you to do all the work for me although I would appreciate a demo, but if you could at least tell me what I’m looking for it would be appreciated as I have no idea where to start. Thanks

Read more here: Changing the content of a div if a link is clicked


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: