WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
[resolved] Connexion of connexions (3 posts)

  1. Francois Lamotte
    Member
    Posted 1 year ago #

    Hi Scribu,

    I've got a model like this :

    a) trainings_to_chapters
    b) chapters_to_lessons
    c) lessons_to_videos

    On a training page, I can retrieve any chapter data except link to other connexions.

    I would be interested to retrieve the lessons and videos details linked to thoses chapters.

    I get messages like :

    Warning: Can't determine direction for 'videos_to_lecons' type.

    Notice: Trying to get property of non-object in

    Warning: Invalid argument supplied for foreach() in

    Is it something doable?

    I've searched on the forum to see a similar thread but did not found something similar.

    http://wordpress.org/extend/plugins/posts-to-posts/

  2. Francois Lamotte
    Member
    Posted 1 year ago #

    I've found your tutorial LOPPING THE LOOP on the wiki with the Further nesting sample code.

    Great example for my case.

    However I still got 2 questions :

    Here is a piece of my template

    http://wordpress.pastebin.ca/2163279

    Line 35, I try to get a custom field data without success.

    If you found my error or the way to ask that custom field, it would save my day.

    Line 17 I try to match posts with a custom field value. Line 20 and 21 works fine ... only the right posts are displayed.

    However from line 25 (a copy/paste of the sample code on the wiki), retrieves back every posts linked to the current page.

    Here also the procedure maybe trivial, but any help would be appreciated.

    Regards,

  3. Francois Lamotte
    Member
    Posted 1 year ago #

    I've found the error for the line 35 (custom field), it was missing single quotes before ad after the get_post_meta.

    Still did not find for the conditional loop ...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic