Support » Plugin: Posts 2 Posts » How to dynamically filter the results in the Admin Box.

  • I’m using P2P to link two CPT. I already connected the two CPT but the default admin box can’t fit my needs. Imagine this scenario:

    CPT 1 have a custom field of YES or NO choice (0 or 1 in database) and is the FROM for P2P.

    In the CPT 2 I need a custom box for P2P with a select field (YES, NO or BOTH) that filters the results that the P2P brings to connect. Like if Yes is selected the results should show only posts from CPT 1 that contains the custom field market at YES, and vice-versa, dynamically when user is creating a new post in CPT two.

    I’m new to PHP and WordPress development and don’t know where to start that…

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think the starting point is (if you haven’t done so already) is to define the metadata fields within the register_connection_types statement.

    Would you show your code for the connections?

    Ted

    Thanks for your reply Ted.

    After hours of study I did the work without using the P2P.

    Regards!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to dynamically filter the results in the Admin Box.’ is closed to new replies.