• Resolved Goudie

    (@goudie35)


    Hi,

    Again thank to Scribu for this very useful plugin. I have a problem in my admin panel, when I try to connect two different post types.

    For example I have one dedicated to games (‘games’) and others for the news or reviews who talks about these games (‘news’ and ‘reviews’).

    When I am editing a ‘news’, the “connected games” box works fine to create ‘games’ quickly or choose one of the latests created ‘games’. The problem is : when I search a ‘games’ in this box, the results are ‘news’ or ‘reviews’… anything but ‘games’ so I can’t choose the item I want.

    Of course the item I am searching is already created. When I edit this ‘games’, I can search the related ‘news’ in the box and connect it to the ‘games’, but this is really not practical cause I have to do that for many many many posts…

    The problem is the same when I try to connect ‘games’ when editing ‘reviews’.

    Here is my functions.php :

    p2p_register_connection_type( array(
    		'name' => 'games_news',
    		'reciprocal' => true,
    		'from' => 'news',
    		'to' => 'games'
    	) );
    	p2p_register_connection_type( array(
    		'name' => 'games_reviews',
    		'reciprocal' => true,
    		'from' => 'reviews',
    		'to' => 'games'
    	) );

    I hope my poor english is not confusing.

    Thank you for your help!

    http://ww.wp.xz.cn/extend/plugins/posts-to-posts/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Goudie

    (@goudie35)

    Another clarification: when I scroll some pages in the “games to connect” box, the ‘games’ item I want is in the list and I can connect without problem. But most often I have to scroll through dozens of pages, so I really need to use search…

    Please help! 🙂

    Thread Starter Goudie

    (@goudie35)

    Aaah sorry… I thought I had searched, but not enough!

    The solution was actually here on the forum… The problem is a function used to add “post types” to search.

    As specified by “daxitude” and “JsonB123” (thanks !) the solution is “simply” to add a condition “is_admin” not to disturb the search for the admin panel.

    Source: here and

    Resolved! Fantastic plugin!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Problems when searching related posts’ is closed to new replies.