Viewing 5 replies - 1 through 5 (of 5 total)
  • I put all of that into the “bio” box since there doesn’t seem to be a way to add fields.

    Plugin Contributor Buooy

    (@buooy)

    Hi Etruchan,

    Sorry for the long wait in support. I’m working on this plugin on the side and I have been overwhelmed at my day job.

    As per what Jess said, you can add it in the bio box. I’m planning to add more social links soon (maybe in the next 2-3 releases). So do stay tune!

    Hope you have a great day!

    If you want to add fields you have to change a couple of the php documents.

    First, go to /admin/includes/class-meet-my-team-build-cpt.php

    starting around line 118 you will see some sections of code that are laying out the different variables/fields that look like this:

    /* Personal URL */
    	            array(
    	                'name' 	=> 'Personal URL',
    	                'desc' 	=> 'Member\'s URL',
    	                'id'	=> $prefix . 'url',
    	                'type' 	=> 'text',
    	                'options' => array(),
    	            ),

    For every field you want to create, you will need to copy one of these and change everything that you need to be different, so for a phone number, you could do:

    /* Phone Number */
    	            array(
    	                'name' 	=> 'Phone Number',
    	                'desc' 	=> 'Member\'s Phone Number',
    	                'id'	=> $prefix . 'pnumber',
    	                'type' 	=> 'text',
    	                'options' => array(),
    	            ),

    Then go to /public/includes/shortcodes.php

    You will need to get your variable from the database, which is done for the other fields around line 136

    It would look like this:

    $member_details['phone_number']	=	get_post_meta( $member->ID, 'mmt_pnumber', true );

    Then you need to use your new variable to display the information, if it has been written in, so you write an if statement to determine that, and display it if necessary.

    if( $details['phone_number'] != '' ){
    			$modal .= '<h6>'.$details['phone_number'].'</h6>';
    		}

    Once this is all done, it will create a spot for you to input a phone number, save it in the database, then pull that number out of the database and display it on your page. It is a little more complex to set up than just using the bio section, but you can use this method to create whatever custom fields you want.

    Hopefully this helps.

    Yeah awillard108!

    this worked nicely for me!

    thanx

    Thanks awillard108!

    This also worked like a champ for me and it was clearly explained.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How/Where to Add Fields’ is closed to new replies.