Thread Starter
Rhand
(@rhand)
I can create page to page connections using
function my_connection_types() {
// Make sure the Posts 2 Posts plugin is active.
if ( !function_exists( 'p2p_register_connection_type' ) )
return;
p2p_register_connection_type( array(
'name' => 'pages_to_pages',
'from' => 'page',
'to' => 'page'
) );
}
add_action( 'wp_loaded', 'my_connection_types' );
It creates two sidebar boxes in the page editor: from pages and to pages. What I wonder about here is A)Does this mean I can now load permalinks with different page parents for ONE child or how can that be achieved now that I made this connection? and B)Why do I see a from page and two page box now instead of one using the sample at https://github.com/scribu/wp-posts-to-posts/wiki/Basic-usage ?
See also similar discussion here: http://wordpress.stackexchange.com/questions/8848/one-page-multiple-parents
Plugin Author
scribu
(@scribu)
A) Does this mean I can now load permalinks with different page parents
No, it doesn’t. At the momemnt, P2P doesn’t interfere with permalinks in any way.
B) Why do I see a from page and to page box now
One box is for the children and the other is for the parents. See https://github.com/scribu/wp-posts-to-posts/wiki/Reciprocal-connections
Thread Starter
Rhand
(@rhand)
Does that mean you CAN connect one child page to two parents? Wondering if I can use this in some way to load a child page’s content under different parents without recreating the same child page again and again using a different name..
Plugin Author
scribu
(@scribu)
You can, but you’ll have to handle the permalinks yourself.
Thread Starter
Rhand
(@rhand)
Thanks so far Scribu!
So let’s say I have
- regular (parent) – tarifs (child)
- reference (parent) – tarifs (same child)
- professionals (parent) – tarifs (same child)
I can add tarifs to these three pages as in FROM pages, making them parents?
But then I would still have the permalink issue. Using %postname% now, which is supposed to work, but still having issues.