WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
How to display children custom_post (1 post)

  1. t1l3
    Member
    Posted 1 year ago #

    Hi,

    I'm stuck to display childrens of a custom_post_type.
    I have 2 custom_post_type: projects and users. Users Belong to projects. It works perfectly in the wordpress backoffice but I don't know how to display users which belong to a project on a project page.

    In single-project.php, I did the following code but, it show me all users and not the users to the project of the page.

    <?php $loop = new WP_Query(array('post_type' => 'user', 'post_status' => 'publish'));
    while ( $loop->have_posts() ) : $loop->the_post();
    php the_title();
    phpendwhile; ?>

    (I see _wpcf_belongs_project_id in my table wp_postmeta)

    Thanks

    http://wordpress.org/extend/plugins/types/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.