Title: [Plugin: Posts 2 Posts] Problem with a get_sidebar()
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] Problem with a get_sidebar()

 *  [Francois Lamotte](https://wordpress.org/support/users/francoislamotte/)
 * (@francoislamotte)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-problem-with-a-get_sidebar/)
 * Hello Scribu,
 * [On that page](http://dev3.pointben.net/formation/iphoto-debutant), you’ll see
   a training page for an online video subscription service.
 * I’ve got a problem with the sidebar but not with the core of the page.
 * The structure is the following:
 * training <-> chapters
    chapters <-> lessons lessons <-> videos
 * So in the core of the page, I used your “further nesting” methodology and it 
   works pretty well. I can retrieve information on any level.
 * But on the sidebar, there is a subtlety that I don’t get.
 * I am interested to build a menu with a list of :
 * – chapters
    — lessons
 * I can retrieve one of the other but never both in cascade.
 * When I try a WP_Query with every “training custom post” it works … but it list
   every training . This is the menu on “**Further nesting part 2:**” or “**Further
   nesting part 1:**“
 * [Here is the full code of the page ](http://pastebin.com/65P9EkTk)that is saved
   a sidebar-training.php and call like that inside the code in the main content
   of the single-training.php page. (it is not called just after the main content
   and before the footer().
 * `<?php get_sidebar('formation'); ?>`
 * Thank you very much for your time.
 * If you need more information or more details on the main page, don’t hesitate.
 * F
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Francois Lamotte](https://wordpress.org/support/users/francoislamotte/)
 * (@francoislamotte)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-problem-with-a-get_sidebar/#post-2873393)
 * [The example of the code of the sidebar page is here](http://pastebin.com/5dU7kmmN)
   as the previous example has been deleted on pastebin.
 * [http://pastebin.com/5dU7kmmN](http://pastebin.com/5dU7kmmN)

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Posts 2 Posts] Problem with a get_sidebar()’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-to-posts_7a8e9d.svg)
 * [Posts 2 Posts](https://wordpress.org/plugins/posts-to-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-to-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-to-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-to-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-to-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-to-posts/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Francois Lamotte](https://wordpress.org/support/users/francoislamotte/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-problem-with-a-get_sidebar/#post-2873393)
 * Status: not resolved