WordPress.org

Ready to get started?Download WordPress

Forums

BadgeOS
[resolved] Custom Fields? (4 posts)

  1. Martin
    Member
    Posted 1 year ago #

    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/

  2. Brad Williams
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. Martin
    Member
    Posted 1 year ago #

    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

  4. Ala7lam
    Member
    Posted 7 months ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.