Hmm.. Is this possible please?
-
Hi!
I have my graduate guide advice tip site here:
…and am having some thoughts on navigation!
I would like the posts under each category to be listed vertically underneath when the category is clicked on in the ‘Pick a Category’ sidebar box.
When two categories are opened up I would like the other to close so the left hand bar does not get over crowded.
I have this is my sidebar.php-
<?php // Menu for subpages of current page // Only shows if the current page has subpages if($post->post_parent) { $parent = wp_list_pages("title_li=&include=".$post->post_parent."&echo=0"); $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); } else { $parent = wp_list_pages("title_li=&include=".$post->ID."&echo=0"); $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); } if ($children) { echo '<h3 class="pages">Sub Pages</h3>'; echo '<ul class="navigation">'; echo $parent; echo $children; echo '</ul>'; } // End Subpage menu ?> <?php // Category Navigation ?> <h3 class="folder">Skill Topics</h3> <ul id="navigation"> <?php wp_list_categories('depth=2&title_li='); ?> </ul> <?php if (is_single() && function_exists('related_posts_by_category')) { $home = get_bloginfo("home"); echo '<h3 class="related">Related Articles</h3>'; echo '<div id="related">'; echo '<ul>'; related_posts_by_category( array( 'orderby' => 'post_date', 'order' => 'DESC', 'limit' => 5, 'echo' => true, 'before' => '<li>', 'inside' => '', 'outside' => '', 'after' => '</li>', 'rel' => 'nofollow', 'type' => 'post', 'message' => '<li><a href="'.$home.'">Sorry, no matches.</a></li>' ) ); echo '</ul>'; echo '</div>'; }?>
Could you please let me know if there is more code hidden somewhere?
Thank you!!
Leon
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Hmm.. Is this possible please?’ is closed to new replies.