WordPress Custom Taxonomies

I’m wondering if there’s a way to list all custom taxonomies that are siblings to the current page (e.g. in my single.php)?

For example my taxonomy is as follows

Read More

Categories

  • — Ancient
  • +++ Greek
  • ///// Plato
  • ///// Socrates
  • +++ Roman
  • +++ Indian
  • — Classic
  • — Modern

I’d like to create a sidebar that lists all other items that have the same parent (including descendants of other siblings – e.g. “Greek” page would list “Roman” and “Indian”. The “Ancient” page would include links to “Ancient >> Greek”, “Ancient >> Roman”, “Ancient >> Indian”, “Classic” and “Modern” Pages. )

Is this possible with custom taxonomies? How can I achieve it?

Thanks!

*EDIT*

Also, for reference, I am working with the following blog posts which give a more detailed insight into what I need, I simply am having trouble customizing it to the specifications I mentioned in my original post:

http://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/

https://github.com/scribu/wp-query-multiple-taxonomies/wiki/Changing-templates

http://scribu.net/wordpress/extending-the-category-walker.html

Related posts

Leave a Reply

1 comment

  1. $post = get_post($id); //Get the post id
    
        if($post->post_parent){ //If it has a parent
    
            wp_list_pages('child_of='.$post->post_parent . '&exclude='.$id); //List the pages that are children of the parent page, excluding the current one.
    
        }
    

    This will create a list of all the siblings of a page. I have a feeling you want something slightly different, as you mention custom taxonomies as well as pages. Are these custom post types, categories, or pages? Let me know if this works for you 🙂