Support » Plugin: Our Team by WooThemes » Adding new custom field doesn't work

  • Hello,

    First of all I’d like to say that this plugin is really great, thanks for puting your effort into it.

    To the problem: I followed the guide in FAQ, adding the sample code to the functions.php inside my template dir (filter that hides field works btw), but it simply doesn’t add any field to Add/Edit Team Member in WP-Admin.

    I’m clueless what to do now.

    http://wordpress.org/plugins/our-team-by-woothemes/

Viewing 10 replies - 1 through 10 (of 10 total)
  • I am also experiencing this issue.

    The hook as stated in the FAQ is incorrect. Use woothemes_our_team_member_fields instead of woothemes_our_member_fields.

    Thanks @maartenhemmes – your solution solved it for me 🙂

    This is my code and it isn’t working 🙁

    ######### Functions.php #########
    add_filter( 'woothemes_our_team_member_fields', 'my_new_fields' );
    function my_new_fields( $fields ) {
        $fields['misc'] = array(
            'name' => __( 'Misc', 'our-team-by-woothemes' ),
            'description' => __( '', 'our-team-by-woothemes' ),
            'type' => 'text',
            'default' => '',
            'section' => 'info'
        );
        return $fields;
    }
    ######### Frontend #########
    add_filter( 'woothemes_our_member_fields_display', 'my_new_fields_display' );
    function my_new_fields_display( $member_fields ) {
    	global $post;
    	if ( '' != $post->misc ) {
    		$member_fields .= '<li class="misc">' . $post->misc . '</li><!--/.misc-->' . "\n";
    	}
    	return $member_fields;
    }

    Anyone have any idea?

    @yakup1981 Are both those code snippets from your functions.php file of your currently set theme?

    @thorne51

    The code snippets are seperated. The first part is a snippet from the functions.php. The second part is a snippet from a file within the currently selected theme.

    I’m pretty new to WP but its working for me when both are in the functions.php. Not sure if its a matter of the code getting called too late, idk.

    I’ll try your solution again…

    @thorne51

    Thank you for your help, it’s working now!

    The problem was that i made a mistake by placing the code in two seperated files (functions.php and single.php).

    You where right the could should be placed only in functions.php

    I’m now trying to add the custom fields to the bio page.

    Please how can I add more than one field.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Adding new custom field doesn't work’ is closed to new replies.