PasteSite is open to the public, but with limited features. Register to be able to modify access rights, track your pastes and more...
If you prefer reading light text on a dark background to dark text on a light background, then you might want to try the dark theme.
"Untitled" by Anonymous [PHP]Actions:
Replies: |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
/* Template Name: Product Category */ get_header(); <div id="top_buttons"><!~- Easiest Way --></div> <div id="column"> <!-- LOOP --> if (have_posts()) : while (have_posts()) : the_post(); <h2> function getParents($id) { global $wpdb; $posts_table = $wpdb->prefix . "posts"; $parent_id = $wpdb->get_var("SELECT post_parent FROM $posts_table WHERE ID=$id"); if($parent_id == 0) return; $parent = get_post($parent_id); return getParents($parent_id) . '<a href="'. get_permalink($parent_id) . "\" title=\"$parent->post_title\">$parent->post_title</a> > "; } > <a href=" the_permalink() "> the_title(); </a></h2> <!-- Display Subpages & Products --> <ul> $children = get_children("post_type=page&post_parent=$post->ID"); foreach ($children as $child) echo '<li><a href="'. get_permalink($child->ID) . "\" title=\"$child->post_title\">$child->post_title</a></li>"; </ul> endwhile; else : <h2>Not Found</h2> <p>Sorry, but you are looking for something that isn't here.</p> endif; </div> get_sidebar(); get_footer(); |