I am using subpages on the Wordpress site the following

Items (Parent Page) -Office (Subpage 1) --Office Gallery (Child of Subpage 1) -School (Subpage 2) --School Gallery (Child of Subpage 2) ....etc

How do i produce a link on each subpage to the child page using only one template during my theme? I have to have the ability to give this link a css class title. Quite simply I have to possess the code during my page template look something similar to:

<a class="gallery-button" href="RETURN LINK TO CHILD PAGE OF CURRENT PAGE"></a>

or something like that like this......

I attempted using wordpress_list_pages for a kid page in the WordPress Codex but this returns a listing and that i actually need only the permalink towards the child page.

Is easy? Impossible?

Thanks ahead of time.

You will need to query posts to obtain the first child from the publish under consideration

    if ($children = get_children('post_type=page&numberposts=1')) {
        $first_child = $children[0];
        $first_child_permalink = get_permalink($first_child->ID);
        echo '<a class="gallery-button" href="' . $first_child_permalink . '">Link Text</a>';