Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Dynamically link to child page WP Re: Dynamically link to child page WP

#72014
soap
Participant

You can do it by giving your pages tag id’s.

Then use jquery or javascript to determine whether a page is a subpage and if it is then those links will link to it’s parent..

My jquery/javascript isn’t very strong but it would be something along these lines:


if($("body").attr("id", "products_sub")) {
a.class_name.attr("src", "products.php");
}

I might be wrong but you can try playing around with that.