Home › Forums › Back End › Dynamically link to child page WP › Re: Dynamically link to child page WP
November 28, 2010 at 4:15 am
#72014
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.