{"id":75666,"date":"2017-10-04T09:45:53","date_gmt":"2017-10-04T09:45:53","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/npc-neatekpostconnect\/"},"modified":"2019-06-18T09:48:54","modified_gmt":"2019-06-18T09:48:54","slug":"npc-neatekpostconnect","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/npc-neatekpostconnect\/","author":14784966,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.2","stable_tag":"trunk","tested":"5.2.24","requires":"4.6","requires_php":"","requires_plugins":"","header_name":"(NPC) NeatekPostConnect","header_author":"Vladimir Zhelnov","header_description":"Many-to-many connections","assets_banners_color":"","last_updated":"2019-06-18 09:48:54","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/neatek.ru\/support\/","header_plugin_uri":"","header_author_uri":"https:\/\/neatek.ru\/","rating":5,"author_block_rating":0,"active_installs":10,"downloads":1175,"num_ratings":0,"support_threads":1,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":{"1.0":"<p>Alternative for posts2posts.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"2107947","resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"2107947","resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[14510,175,14511,166,147360],"plugin_category":[],"plugin_contributors":[147361],"plugin_business_model":[],"class_list":["post-75666","plugin","type-plugin","status-closed","hentry","plugin_tags-connections","plugin_tags-links","plugin_tags-many-to-many","plugin_tags-posts","plugin_tags-posts2posts","plugin_contributors-neatek","plugin_committers-neatek"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/npc-neatekpostconnect.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin can make Many-To-Many connections of posts (also custom posts), \nyou can setup it in wp-admin\/options-general.php?page=neatek-posts-connects<\/p>\n\n<p>Plugin supports English and Russian languages.<\/p>\n\n<p>Snippet to get connected posts:<\/p>\n\n<pre><code>&lt;?php\n    \/\/ $post_id = get_the_id();\n    $query = npc_query_connected($post_id, 'needed_post_type');\n    while($query-&gt;have_posts()) {\n        $query-&gt;the_post();\n        the_title();\n    }\n?&gt;\n<\/code><\/pre>\n\n<p>It will get all connected posts with posttype 'needed_post_type' for $post_id ID Post.\nAlso, you can get_posts() connected posts.<\/p>\n\n<pre><code>&lt;?php\n    \/\/ $post_id = get_the_id();\n    $c_posts = npc_get_connected($post_id, 'needed_post_type');\n    var_dump($c_posts);\n?&gt;\n<\/code><\/pre>\n\n<p>You can modify WP_Query or get_posts() args:<\/p>\n\n<pre><code>&lt;?php\n    $args = array(\n        'posts_per_page' =&gt; 5\n    );\n    \/\/ $post_id = get_the_id();\n    $c_posts = npc_get_connected($post_id, 'needed_post_type', $args);\n?&gt;\n<\/code><\/pre>\n\n<p>Or you can just get IDS of connected posts:<\/p>\n\n<pre><code>&lt;?php\n    \/\/ $post_id = get_the_id();\n    $ids = npc_get_post_ids($post_id, 'needed_post_type');\n    var_dump($ids);\n?&gt;\n<\/code><\/pre>\n\n<p>Important: Do not use 'numberposts', use 'posts_per_page'.<\/p>\n\n<p>The best alternative for:\nhttps:\/\/ru.wordpress.org\/plugins\/posts-to-posts\/<\/p>\n\n<p>Thank you for using my plugin.<\/p>\n\n<!--section=installation-->\n<p>Just install and press activate, and start setup.<\/p>\n\n<ol>\n<li>Go to wp-admin\/options-general.php?page=neatek-posts-connects and connect some types of posts.<\/li>\n<li>Go to any posts in connected types.<\/li>\n<li>Create link between posts.<\/li>\n<li>Use Plugin functions in Theme.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<p>First release.<\/p>","raw_excerpt":"This plugin can make Many-To-Many connections of posts.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/75666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=75666"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/neatek"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=75666"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=75666"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=75666"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=75666"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=75666"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=75666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}