[Plugin: Posts 2 Posts] Connecting to Custom Post Type fails
-
I’ve run into a problem trying to connect pages to custom post types. Whenever I use the following code, the meta box is available in the admin and it successfully searches for posts. However, it does not limit the search to only the custom post type. Moreover, it fails to save the connection.
$args = array( 'from' => 'page', 'to' => 'promo', 'reciprocal' => false, 'title' => 'Attach Promotions' );
Full code snippet at https://pastebin.com/5Ndt2HNL
However, if I change my code to the following (a page to post connection), then not only does it save the connections, but it also shows all the connections that I tried to make with the page to promo connection.
$args = array( 'from' => 'page', 'to' => 'post', 'reciprocal' => false, 'title' => 'Attach Posts' );
Full code snippet at https://pastebin.com/pdKDuKGR
Any ideas why?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘[Plugin: Posts 2 Posts] Connecting to Custom Post Type fails’ is closed to new replies.