BuddyDev

Search

[Resolved] BP Profile Tab Pro – Default Tab Error

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #14724

    Hi Sujee,
    No problem.

    You most probably copied the function name and php does not allow two function definitions with same name in any given scope/namespace.

    Here is how you can do it.

    
    /**
     * Register post type for User Content.
     */
    function buddydev_register_post_type() {
    	register_post_type( 'bp_user_content', array(
    		'label'    => 'User Content',
    		'labels'   => array( 'name' => 'User Contents' ),
    		'public'   => false,
    		'show_ui'  => true,
    		'supports' => array( 'title', 'editor', 'author', 'custom-fields' )
    	) );
    
    	/* New post type*/
    	register_post_type( 'post_type_name', array(
    		'label'    => 'Label Post Type',
    		'labels'   => array( 'name' => 'Plural Label' ),
    		'public'   => false,
    		'show_ui'  => true,
    		'supports' => array( 'title', 'editor', 'author', 'custom-fields' )
    	) );
    }
    
    add_action( 'init', 'buddydev_register_post_type' );
    
    

    I hope it helps.

  • Participant
    Level: Enlightened
    Posts: 90
    Sujee Kulendran on #14725

    Sure enough – it worked! You are awesome! Looking forward to the MediaPress update and I should be moving onto your Ajax registration plugin now (I have another 3rd party that I’m getting rid of).

    Cheers!!

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #14733

    Thank you Sujee.
    I will suggest to hold on to update for Ajax Registration. We are revamping it and It will be a lot different in next 10-15 days from what it is now.,

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 90
    Sujee Kulendran on #14743

    Awesome!! Looking forward to it

The topic ‘ [Resolved] BP Profile Tab Pro – Default Tab Error’ is closed to new replies.

This topic is: resolved