scribu
Forum Replies Created
-
There’s already a
'p2p:context'variable passed which could be used to single out the query.You pasted the code for the _assert_db_structure() function, but where are you hooking it?
Forum: Plugins
In reply to: [Posts 2 Posts] Change admin box titleYou just need to set the ‘title’ key in the p2p_register_connection_type() call:
https://github.com/scribu/wp-posts-to-posts/wiki/Admin-box-display
Forum: Plugins
In reply to: [Posts 2 Posts] Posts to Page Connections For AuthorsWell, currently, you’d basically have to grant authors editing capabilities over those pages.
Will look into a better way to handle this in the future.
Forum: Networking WordPress
In reply to: Making a plugin multi site compatible?If you’re making direct SQL queries, make sure to use
$wpdb->postsinstead of'wp_posts'.If you need to get a list of DB tables for a single blog, try using
$wpdb->tables()instead of ‘SHOW TABLES’.Other than that, there is no magic bullet for making a plugin multi-site compatible, especially for a backup/migration plugin like Duplicator.
Forum: Plugins
In reply to: [Posts 2 Posts] Find posts with no user connectionWell,
get_connetable()actually usesget_connected()internally, so I’m not sure if you’ll gain much.Forum: Plugins
In reply to: [Posts 2 Posts] Find posts with no user connectionALL THE POSTS! 🙂
Forum: Plugins
In reply to: [Posts 2 Posts] Find posts with no user connectionYou could use
$posts = p2p_type( 'YOUR_CONNECTION_TYPE' ) ->set_direction( 'from' ) ->get_connectable( 'any' );Replace ‘from’ with ‘to’, if necessary.
Forum: Plugins
In reply to: [Posts 2 Posts] 3.5 ErrorMore information is necessary:
1) What are the parameters sent to
p2p_register_connection_type()?
2) What’s the query that’s causing the warning?I suggest putting this info into a gist: http://gist.github.com
Forum: Plugins
In reply to: [Posts 2 Posts] reordering connected posts of same typePlease post your
p2p_register_connection_type()call.Drag-and-drop reordering can’t work if you have
'reciprocal' => true.Forum: Plugins
In reply to: [Posts 2 Posts] Limit connection to one post?1) Can the connection be setup to limit the connection to a single post?
Yes, use the
'cardinality'setting: https://github.com/scribu/wp-posts-to-posts/wiki/Duplicate-connections-and-cardinality2) Is there an efficient way to query a singular connected post and return it rather than a full $query.
No, not really.
Forum: Plugins
In reply to: [Query Multiple Taxonomies] A nice addition (patch) for drilling in subpagesHi Konrad,
See that
apply_filters( 'qmt_base_url', ... )call?You can use that to overwrite the URL that QMT generates, without forking the plugin:
https://github.com/scribu/wp-query-multiple-taxonomies/wiki/Changing-URLs
Forum: Plugins
In reply to: [Posts 2 Posts] Breaks with update to WP 3.5Ok, could you explain what you mean by “The connected class no longer displays, rather it displays itself.”
Also, if you replace the ‘event’ post type in the connection type with ‘page’, for example, does it work as expected? (I’m trying to get the Event Manager plugin out of the picture).
Forum: Plugins
In reply to: [Posts 2 Posts] Breaks with update to WP 3.5Oh, ok. Please add the p2p_register_connection_type() call to that gist as well (separate file).
Forum: Plugins
In reply to: [Posts 2 Posts] Breaks with update to WP 3.5Pasting the contents of that file in a gist would help.