WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Custom Fields?

[Resolved] Custom Fields?

  • Is there any way I can display Custom Fields on my badges edit screens like afforded me on Posts and Pages?
    You see, I need to add a custom field value so my usual Author Bo doesn’t display as it looks a little out of place on what is an informational page.

    Is this possible to do through maybe a functions.php entry?

    http://wordpress.org/extend/plugins/badgeos/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Brad Williams

    @williamsba1

    If you are looking for the Custom Fields metabox, you could drop this code into your functions.php file to display it:

    add_action( 'init', 'bos_add_post_type_support' );
    
    function bos_add_post_type_support() {
    
    	add_post_type_support( 'badge', 'custom-fields' );
    
    }

    Keep in mind many of the custom fields for BadgeOS are prefixed with an underscore, which hides them from displaying in the Custom Fields metabox.

    Worked a treat, Brad – thank you.

    Just a note to anyone else, you need to adjust the badge part of the add_post_type_support portion to be the slug of the award type

    Was looking to do the same thing and hopefully be able to map a custom field to Credly instead of the default ones.

    Thanks all!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Custom Fields?’ is closed to new replies.