WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
administrator form post list of some categories (2 posts)

  1. Thiag
    Member
    Posted 1 year ago #

    sorry my horrible English,

    need list posting some categories, not all. Following is the code:

    function my_connection_types() {
    
    class My_P2P_Box extends P2P_Box_Multiple {
    
    		function get_search_args( $search ) {
    			$args = parent::get_search_args( $search );
    			$args['category_name'] = 'tecnicos';
    			return $args;
    		}
    	}
      if ( !function_exists( 'p2p_register_connection_type' ) )
    		return;	
    
        p2p_register_connection_type( array(
    	'name' => 'posts_to_posts',
    	'from' =>  'post',
            'box' => 'My_P2P_Box',
            'context' => 'advanced',
            'reciprocal' => true,
    	'title' => 'Artigos vs Cursos'
            ) );
    }
    add_action( 'p2p_init', 'my_connection_types' );

    P2P_Box_Multiple seems not work.
    Posts to Posts: version 1.4.2
    Thank you.

    http://wordpress.org/extend/plugins/posts-to-posts/

  2. Thiag
    Member
    Posted 1 year ago #

    Panel administrator list by category

    someone?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic