• Resolved morfer

    (@morfer)


    Hello I try to add my own taxonomy for the jetpack portfolio post-type like this:

    In my function.php:

    tpack portfolio post-type like this:
    
    In my function.php:
    
    add_action( 'init', 'fh_portfolio_taxonomy');
     
    function fh_portfolio_taxonomy() {
     
      $labels = array(
        'name' => _x( 'Materialien', 'taxonomy general name' ),
        'singular_name' => _x( 'Material', 'taxonomy singular name' ),
        'search_items' =>  __( 'Materialen suchen' ),
        'all_items' => __( 'Alle Materialien' ),
        'parent_item' => __( 'übergeordnetes Material' ),
        'parent_item_colon' => __( 'übergeordnetes Material:' ),
        'edit_item' => __( 'Material bearbeiten' ), 
        'update_item' => __( 'Material aktualisieren' ),
        'add_new_item' => __( 'Neues Material anlegen' ),
        'new_item_name' => __( 'Materialname' ),
        'menu_name' => __( 'Materialien' ),
      );    
     
      register_taxonomy('jetpack-portfolio-material','jetpack-portfolio', array(
        'hierarchical' => false,
        'labels' => $labels,
        'public' => true,  
        'show_ui' => true,
        'show_admin_column' => true,
        'show_in_nav_menus' => true,  
        'query_var' => true,
        'rewrite' => array( 'slug' => 'material' )
      ));
    	
    register_taxonomy_for_object_type('jetpack-portfolio-material', 'jetpack-portfolio');
    	
    }

    The extra taxonomy menu item on the main navigation on the left side is there and I can edit my “Material” stuff, but it doesn’t appear as a metabox in the portfolio post on the right side (beside revision, excertp, etc.).

    Is there a trick to get it also as a normal metabox to be able to assign the “Material” inside the portfolio post? The metabox is totaly missing.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support fresatomica

    (@fresatomica)

    Hi there!

    We can’t really help you out with custom code but you may want to have a look at this thread, might be helpful.

    This is also a great resource: https://developer.www.ads-software.com/plugins/taxonomies/

    I’ll leave this issue here in case other community members can help.

    Thread Starter morfer

    (@morfer)

    Hello, I just wonder, because my code is the standard wordpress way to integrate a taxonomy for a custom post type.

    Is there any function in jetpack which prevents me from intergrate another taxonomy?

    Greetings

    Plugin Support supernovia

    (@supernovia)

    There shouldn’t be. As you pointed out, the menu item appears, so it seems to just be an issue with getting it to show in the editor.

    I checked in with some developers. They recommended adding this in addition to show_ui:

    'show_in_rest' => true

    Want to give that a try?

    Thread Starter morfer

    (@morfer)

    Oh my god, that did it! Thanks a lot for the hint!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Additional custom taxonomy on jetpack portfilio not showing up as metabox’ is closed to new replies.