Title: Posts 2 Posts Relationships
Author: wp-centrics
Published: <strong>जुलै 7, 2021</strong>
Last modified: जुलै 19, 2021

---

प्लगइन शोधा

![](https://ps.w.org/posts-2-posts-relationships/assets/banner-772x250.png?rev=2560166)

हे प्लगइन **WordPress च्या शेवटच्या 3 महत्त्वाच्या प्रमुख पुनर्वितरणांच्या साथी 
चाचणी झालेले नाही**. हे येथे वापरल्यास सामर्थ्य देणार नाही किंवा त्या आधारित असु
शकते आणि WordPress च्या अधिक अद्ययावत आवृत्तींसह वापरताना संगतता समस्यांची शक्यता
आहे.

![](https://ps.w.org/posts-2-posts-relationships/assets/icon-256x256.gif?rev=2560166)

# Posts 2 Posts Relationships

 [wp-centrics](https://profiles.wordpress.org/wpcentrics/) कडून

[डाउनलोड करा](https://downloads.wordpress.org/plugin/posts-2-posts-relationships.zip)

 * [तपशील](https://mr.wordpress.org/plugins/posts-2-posts-relationships/#description)
 * [पुनरावलोकने](https://mr.wordpress.org/plugins/posts-2-posts-relationships/#reviews)
 *  [इंस्टॉलेशन](https://mr.wordpress.org/plugins/posts-2-posts-relationships/#installation)
 * [डेव्हलोपमेंट](https://mr.wordpress.org/plugins/posts-2-posts-relationships/#developers)

 [समर्थन](https://wordpress.org/support/plugin/posts-2-posts-relationships/)

## वर्णन

This plugin allows you to create many-to-many relationships between posts of any
type: post, page, custom post types, etc.

Configure post 2 post connections easily in a friendly interface.

The new connection metaboxes will appear on the related post edition pages. Search
text, post type and term combo filter available as option for it.

Use the standard WP_Query() and get_posts() to get the related posts.

Solid-rock relationships: use his own database table, updated on post status change
and removed on post deletion.

#### Getting related: the WP_Query way

    ```
    // inside main loop, current post ID (p2p_rel_post_id) not needed, current post will be used if you don't set it:

    $args = array(
        'p2p_rel_key'        => 'prod_to_bars',  // This is your connection key name. Required.
        'p2p_rel_post_id'    => 1,               // The post ID. Inside main loop dont needed.
        'p2p_rel_direction'  => 'any',           // The connection direction. 'any' by default. Optional. Explained below. ( can be 'any' | 'from_to' | 'to_from' )

        // Of course, here you can add the standard WP arguments you need: post type, status, dates, pagination, etc.
    ); 

    // (at this point, as any other WP looping):

    // The Query 
    $the_query = new WP_Query( $args );

    // The Loop
    if ( $the_query->have_posts() ) {
        echo '<ul>';
        while ( $the_query->have_posts() ) {
            $the_query->the_post();
            echo '<li>' . get_the_title() . '</li>';
        }
        echo '</ul>';
    } else {
        // no posts found
        echo '<p>Nothing related</p>';
    }

    // Restore original Post Data 
    wp_reset_postdata();
    ```

#### Getting related: the get_posts() way

    ```
    // inside main loop, current post ID (p2p_rel_post_id) not needed, current post will be used if you don't set it:

    $args = array(
        'p2p_rel_key'        => 'prod_to_bars', // This is your connection key name. Required.
        'p2p_rel_post_id'    => 1,              // The post ID. Inside main loop dont needed
        'p2p_rel_direction'  => 'any',          // The connection direction. 'any' by default. Optional. Explained below. ( can be 'any' | 'from_to' | 'to_from' )
        'post_type'          => 'any',          // The filtered post types, can be an array. Optional. 'post' by default. (can be 'any' for all)
        'suppress_filters'   => false           // Required

        // Of course, here you can add the standard WP arguments you need: post type, status, dates, pagination, etc.
    ); 

    // (at this point, as any other WP looping):

    $rel_posts = get_posts ( $args );

    print_r( $rel_posts );
    ```

#### Getting related: getting it raw

    ```
    // inside main loop, current post ID (element_id) not needed, current post will be used if you don't set it:

    $args = array(
        'key'           => 'prod_to_bars',  // This is your connection key name. Required.
        'element_id'    => 1,               // The post ID. Inside main loop dont needed.
        'element_type'  => 'any',           // The filtered post types, can be an array. Optional. 'post' by default. (can be 'any' for all)
        'status'        => 'any'            // The filtered post status, can be an array. Optional. 'publish' by default. (can be 'any' for all)
        'direction'     => 'any',           // The connection direction. 'any' by default. Optional. Explained below. ( can be 'any' | 'from_to' | 'to_from' )
    ); 

    global $P2P_Relationships;
    $rel_posts = $P2P_Relationships->get_raw ( $args );

    // Only an array of related post IDs, not the posts objects.
    print_r ( $rel_posts ); 
    ```

#### The connection direction

By default, the connections are bidirectional (any). However, you can get related
posts only in one direction: ‘from_to’ or ‘to_from’.

You can do the same logic at interface level for your users in the backoffice: you
can setup your connection hidding the from metabox or the to metabox (UI mode setting).

## स्क्रीनशॉट

[⌊Relations settings⌉⌊Relations settings⌉[

Relations settings

[⌊Relation settings (details)⌉⌊Relation settings (details)⌉[

Relation settings (details)

[⌊Relationships metaboxes on custom post type edition⌉⌊Relationships metaboxes on
custom post type edition⌉[

Relationships metaboxes on custom post type edition

## स्थापना

See [Installing Plugins](https://codex.wordpress.org/Managing_Plugins#Installing_Plugins).

After activating it, go to Settings > P2P Relationships, and create your new post
2 post connections.

## नेहमी विचारले जाणारे प्रश्न

### Is this plugin an add-on for Advanced Custom Fields (ACF)?

No. This plugin is an stand-alone add-on for WordPress. However, it cover the gap
of ACF about many-to-many post connections, and can be used together.

### Where are the post connections stored?

This plugin store connecitons in his own table on database, instead of post meta.

This gives you a more efficient queries and a solid-rock connections consistency.

The DB table is named: {WP prefix}p2p_relationships

### Double metabox issue on post edition pages

If you need relationships between posts and posts, or products and products, etc.
Hide one of two metaboxes (UI mode setting) to avoid double metabox issue (FROM 
and TO same metaboxes relation in the same page).

## समीक्षा

![](https://secure.gravatar.com/avatar/373379ddec6a6ea94dba4a3cdcf6ce05693da8e8d353d06fa53faa57b4d99c0a?
s=60&d=retro&r=g)

### 󠀁[Amazing plugin!! Save a lot of Time in Development](https://wordpress.org/support/topic/amazing-plugin-save-a-lot-of-time-in-development/)󠁿

 [racmanuel.dev](https://profiles.wordpress.org/racmanuel/) एप्रिल 12, 2022

Amazing plugin!! Save a lot of Time in Plugin and Theme Development

 [ सर्व 1 पुनरावलोकन वाचा ](https://wordpress.org/support/plugin/posts-2-posts-relationships/reviews/)

## योगदानकर्ते आणि विकसक

“Posts 2 Posts Relationships” हे मुक्त स्रोत सॉफ्टवेअर आहे. पुढील लोक या प्लगइनच्या
निर्मितीत योगदान केले आहे.

योगदानकर्ते

 *   [ wp-centrics ](https://profiles.wordpress.org/wpcentrics/)

“Posts 2 Posts Relationships” 1 लोकॅलमध्ये भाषांतरित केले आहे. [अनुवादकांना](https://translate.wordpress.org/projects/wp-plugins/posts-2-posts-relationships/contributors)
त्यांच्या योगदानाबद्दल धन्यवाद.

[भाषांतर करा “Posts 2 Posts Relationships” तुमच्या भाषेत.](https://translate.wordpress.org/projects/wp-plugins/posts-2-posts-relationships)

### विकासातील आग्रह?

[कोड ब्राउझ करा](https://plugins.trac.wordpress.org/browser/posts-2-posts-relationships/),
[SVN संग्रहालय](https://plugins.svn.wordpress.org/posts-2-posts-relationships/) 
तपासा, किंवा [विकास लॉग](https://plugins.trac.wordpress.org/log/posts-2-posts-relationships/)
च्या [RSS](https://plugins.trac.wordpress.org/log/posts-2-posts-relationships/?limit=100&mode=stop_on_copy&format=rss)
द्वारे सदस्यता घ्या.

## बदलांची यादी

#### 1.0.0 – 2021-07-19

 * Checked for WordPress 5.8
 * Added warning and removal option for orphan relationships
 * Text-domain changed to the same as plugin slug: posts-2-posts-relationships

#### 0.0.2 – 2021-07-13

 * Solved admin pane layout broken issue

#### 0.0.1 – 2021-07-07

 * Hello world!

## मेटा

 *  आवृत्ती **1.0.0**
 *  शेवटचा अद्यतन **5 वर्षे पूर्वी**
 *  सक्रिय स्थापना **40+**
 *  वर्डप्रेस आवृत्ती ** 4.7 किंवा मोठा **
 *  परीक्षित केले आहे **5.8.13**
 *  PHP आवृत्ती ** 5.5 किंवा मोठा **
 *  भाषा
 * [Catalan](https://ca.wordpress.org/plugins/posts-2-posts-relationships/) आणि 
   [English (US)](https://wordpress.org/plugins/posts-2-posts-relationships/).
 *  [तुमच्या भाषेत भाषांतर करा](https://translate.wordpress.org/projects/wp-plugins/posts-2-posts-relationships)
 * टॅग्ज:
 * [custom post types](https://mr.wordpress.org/plugins/tags/custom-post-types/)
   [many-to-many](https://mr.wordpress.org/plugins/tags/many-to-many/)[posts 2 posts](https://mr.wordpress.org/plugins/tags/posts-2-posts/)
   [posts to posts](https://mr.wordpress.org/plugins/tags/posts-to-posts/)
 *  [प्रगत दृश्य](https://mr.wordpress.org/plugins/posts-2-posts-relationships/advanced/)

## मूल्यांकन

 5 पैकी ५ तारे.

 *  [  1 5-तारांकित पुनरावलोकन     ](https://wordpress.org/support/plugin/posts-2-posts-relationships/reviews/?filter=5)
 *  [  0 4-तारांकित परीक्षणे     ](https://wordpress.org/support/plugin/posts-2-posts-relationships/reviews/?filter=4)
 *  [  0 3-तारांकित परीक्षणे     ](https://wordpress.org/support/plugin/posts-2-posts-relationships/reviews/?filter=3)
 *  [  0 2-तारांकित परीक्षणे     ](https://wordpress.org/support/plugin/posts-2-posts-relationships/reviews/?filter=2)
 *  [  0 1-तारांकित परीक्षणे     ](https://wordpress.org/support/plugin/posts-2-posts-relationships/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/posts-2-posts-relationships/reviews/#new-post)

[सर्व पुनरावलोकने पहा](https://wordpress.org/support/plugin/posts-2-posts-relationships/reviews/)

## योगदानकर्ते

 *   [ wp-centrics ](https://profiles.wordpress.org/wpcentrics/)

## समर्थन

काहीतरी सांगायचं आहे का? मदतीची आवश्यकता आहे का?

 [समर्थन फोरम पहा](https://wordpress.org/support/plugin/posts-2-posts-relationships/)

## देणगी

आपण हे प्लगइन पुरविण्यात समर्थन करू इच्छिता का?

 [ ह्या प्लगइनला देणगी द्या ](https://www.wp-centrics.com/)