toolset-logo1

WordPress Related Posts: Using Toolset and WP Posts to Posts

If you read my previous post,  WordPress Custom Related Posts: Toolset Plugin & Posts 2 Posts – Combining APIs for even more flexibility, I discussed how combining  Toolset with thePosts 2 Posts plugin creates an easier wordpress maintenance, WordPress related posts interface for the website administrator to create content relationships.  Four Eyes is currently working on a new website for David Keil’s YogAnatomy.com and the site needed a method for connecting content types to one another in an easy and efficient manner.  While we created a solution for Single Post pages, we still needed to be able to use the code in loop while using Toolset.  The solution is a shortcode function that combines the power of the Views API with the enhanced query structure of the Post 2 Posts plugin. /* Toolset to Post 2 Posts View Integration */ add_shortcode( ‘get-related-view’, ‘get_related_view’ ); function get_related_view( $atts ) { extract( shortcode_atts( array( ‘my_post_id’ => …